php - how can I select data from MySQL based on date (unix time record) -


I have a record of data with the date of Unix time

I have row based

Currently I am using something like this

 choose  to tablename where date & gt; 'Today $' & Date & lt; '$ Tomorrow' limit1;  

How accurate is it if $ today and $ yesterday have a different time (but same date)

Is there a better way to do this?

  ... where date (FROM_UNIXTIME (date)) & gt; DATE (FROM_UNIXTIME ('$ Today')) ...  


Comments