Jump to content

[SOLVED] Small date question


waynew

Recommended Posts

I have a datetime column in one of my tables, which means that every looks a bit like:

 

2008-11-20 11:58:00

 

Now, I want to show every record for today. So I would get todays date like so:

 

$current_date = date("Y-m-d");

 

Now, how would I select all records that relate to todays date? I'm pretty sure that you can't do something like:

 

WHERE dateOrder = '$current_date'

 

As the datetime column includes the hour, and not just the date.

 

Anyone wishing to shed the light?

Link to comment
https://forums.phpfreaks.com/topic/133486-solved-small-date-question/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.