Jump to content

Problem with selecting specific dates


Johns3n

Recommended Posts

Hi PHPFreaks.com

 

I wrote in here a while ago about updating table rows by selecting rows which end dates is greater than the current day, much like a experation dates with blog posts in a CMS.

 

I was told to make sure my datatype for the end dates in the database was the datetime format is YYYY-MM-DD HH:mm:SS now I have now changed that, but I am still have trouble creating a query that does exactly what I mentioned.

 

mysql_query("UPDATE ". $db_prefix ."events WHERE end_time >= TIMESTAMP: Auto NOW() SET cat = 1" );

 

Now what I am trying to is that if the current time is greater than the end date I need the "cat" row changed to 1

 

So thanks in advance if you can help me guys :)

Link to comment
https://forums.phpfreaks.com/topic/209645-problem-with-selecting-specific-dates/
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.