Jump to content

update. where time < (30 minutes ago) ?


jwk811

Recommended Posts

try this

 

$sql = "UPDATE message
SET status = 'new'
WHERE post_time >= FROM_UNIXTIME(" . time() - 60*30 . ") ";

 

there should be a way directly in mysql but i'm not totally sure on the syntax.

 

you can look at the date/time f'ns in mysql here: http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html

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.