php date into mysql Date -
why mysql date field not beingness updated?
$st = $this->db->prepare("update users set ipaddress=? , lastlogin=? email=?"); $mysqldate = date('y-m-d'); $st->execute(array($ip_address, $mysqldate, $email));
try without "and" wrong in case of updating:
$st = $this->db->prepare("update users set ipaddress=?, lastlogin=? email=?");
see here: http://dev.mysql.com/doc/refman/5.1/en/update.html
other that, utilize mysql time functions, illustration curdate() accomplish result: https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_curdate
php mysql date
No comments:
Post a Comment