Forum Moderators: coopster

Message Too Old, No Replies

Mysql - Weekly record selection & rotation

mysql prob with selecting a weekly message

         

RogerWilliams

10:17 am on Apr 6, 2006 (gmt 0)



My Problem:
I select a different MYSQL record from DB of 15-65 records, to show each week - the DB is updated about every 2 weeks.
The record displayed changes each week.
:I was doing this finding the first ID number and adding the current week number (1-5) to it, then showing that record, but I now want to be able to delete records!

Is it possible to [depending on the week] select a record in the first quarter, half, etc, assuming it exists?

Thank you for any help or pointers,
Roger.

coopster

4:35 pm on Apr 6, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Welcome to WebmasterWorld, RogerWilliams.

If you have a column defined as type DATE you use MySQL's Date and Time Functions [dev.mysql.com] to retrieve by QUARTER, WEEK, etc.