Archives by date
Posted: Sun Oct 06, 2002 4:50 pm
Hello. I have a table in a MySQL database, and one of the fields in it is 'date'. I have a few questions.
1) In PHPmyADMIN, how do I set the default date to change everyday (If a user submits data in a form, I want that day's date to be automatically attached without any user input)
2) Say I want to dump everything older than 1 week into something called an archive. I write a script What do I put in place of the question mark after 'date='?
Looking forward to a few answers
Thanks.
1) In PHPmyADMIN, how do I set the default date to change everyday (If a user submits data in a form, I want that day's date to be automatically attached without any user input)
2) Say I want to dump everything older than 1 week into something called an archive. I write a script
Code: Select all
SELECT something FROM table WHERE date=? ORDER BY id";Looking forward to a few answers
Thanks.