You can do without the cron update, and optionally the extra column Rank
too.

Instead, you can get a number from 0 - 6 via DATE_FORMAT(now(), '%w')
... eg:

  SELECT * FROM store WHERE id % 7 = DATE_FORMAT(NOW(),'%w') ;

(Tuesday = 2, so show me the stores where id % 7 is 2.)

Using "Rank" is more flexible (you can dictate which stores show on which
days) but this may be a lower maintenance option.

-- 
NZ PHP Users Group: http://groups.google.com/group/nzphpug
To post, send email to [email protected]
To unsubscribe, send email to
[email protected]

Reply via email to