...

View Full Version : Today added



domic
05-03-2006, 09:37 PM
Hy,

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?

homerUK
05-04-2006, 09: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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum