View Full Version : Time / Date

02-10-2006, 12:10 AM
I have a database that stores comments to pictures on my site, each comment has the time attaced to it.

February 9, 2006, 11:03 pm

I want a page that displays comments from today...

$date1 = date("F j, Y, g:i a")
$sql = "SELECT * FROM comment WHERE comment_date = '$date1'";

But the only problem is the time? because it will only show comments added at 11:03pm

Can any one help?

02-10-2006, 08:34 AM
what db + what columntype is it? --> you best use the db-functions to transform/extract the date and evaluate that inside your where clause