php - MysQL Get Time via Query -
the time in row 'signup' stored this: "1427538785" not able use method: where date(signup) = date(now())
but need query time of signup today..
any idea how solve this?
you need from_unixtime
mysql> select from_unixtime('1427538785','%y-%m-%d'); +----------------------------------------+ | from_unixtime('1427538785','%y-%m-%d') | +----------------------------------------+ | 2015-03-28 | +----------------------------------------+ 1 row in set (0.00 sec)
so query
where from_unixtime(signup,'%y-%m-%d') = curdate();
Comments
Post a Comment