mysql - How to use curtime() to check in column with now() structure? SQL -


in db when new user register use now() column date_added (i need exact time of registration). store user ip in column ip

now need check in sql if there registration ip today

but

    $query = $this->db->query("select * " . db_prefix . "customer      ip = '" . $this->db->escape($ip) . "'      , date_added = curdate()");      return $query->row; 

does not work because use now() date_added , now() not = curdate()

any ideas how trick?

use date()

... , date(date_added) = curdate() 

Comments

Popular posts from this blog

javascript - Count length of each class -

What design pattern is this code in Javascript? -

hadoop - Restrict secondarynamenode to be installed and run on any other node in the cluster -