View Full Version : Today added

05-03-2006, 10:37 PM

In my mysql database is row date, and it is in format 00-00-00 00:00:00

And I want, in php file, show how many items is added today...

So, $query="SELECT * FROM table WHERE date="TODAY"";

how to put this correctly?

05-04-2006, 10:29 AM
not sure exactly, but something like

$query = "SELECT * FROM table WHERE date = " . date("d-m-Y",time()) . "";

not sure if you'll have a problem with times. You may need to use the current time and work out 24 hours ago, then do a WHERE date > start_time AND date < current time.