php - Timestamps and date select -


i have fields in db: created_at , updated_at. need select data these fields know how user has changed:

select a.username username,         a.id user_id,         c.id product_id,  credit c  join user on a.id = c.changed_by  c.changed_by = 1  , c.created_at between $date_begin , $date_end  , c.created_at = c.updated_at 

i date_begin , date_end '2017-07-27' , '2017-07-28' form form. created_at , updated_at timestamps in mysql database. , empty result.enter image description here

simply change query cast created_at date:

and date(c.created_at) between $date_begin , $date_end 

Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -