Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Update Mysql Row After X Days
#1
I have a cron job set to run the following query everyday...

PHP Code:
$sql mysql_query("UPDATE `mybb_users` SET style='3' WHERE `date` < DATE_SUB(NOW(), INTERVAL 10 DAY)  uid='$uid'"); 

Which automatically updates a row that is older than 10 days. For some reason, I can't get it to work.

Can somebody help me fix it?

Thanks in advance! Smile
Reply


Messages In This Thread
Update Mysql Row After X Days - by Dutchcoffee - 02-08-2010, 08:09 PM
RE: Update Mysql Row After X Days - by Omniscient - 02-08-2010, 09:39 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My PHP Project, V.03 [UPDATE] ChromeWolf 3 1,160 11-17-2011, 12:59 PM
Last Post: HF~Legend
  optimize mysql through a php script andrewjs18 7 3,378 10-05-2011, 06:31 PM
Last Post: John.
  Creating a simple PHP/MySQL login script ndee 16 10,530 05-14-2011, 02:18 AM
Last Post: モrainee
  Simple MySQL Tutorial Sly 4 1,323 05-14-2011, 01:53 AM
Last Post: Sly
  PHP Echo HTML From MySQL Value? iMr 7 3,798 03-19-2011, 09:41 AM
Last Post: ★Cooldude★

Forum Jump:


Users browsing this thread: 1 Guest(s)