If you only have Wednesdays in you table - that is select the next 12
records after today it's easy:
SELECT * FROM christian_discipleship WHERE created_for_date > now()
ORDER BY created_for_date ASC LIMIT 12
Good luck,
Frank
On Oct 6, 2006, at 8:29 PM, php-db-digest-help@xxxxxxxxxxxxx wrote:
I am wondering if someone would help me write a SELECT date query ...
Weekly mailings go out every Wednesday. I am setting up an
administration function and table to store the mailing name, PDF to be
contained within the mailing and the date for it to be used.
The SELECT query I want to create is for the next 12 records which are
going to be used to be displayed. The first record would be next
Wednesday (not October 11th, but calendar wise based on when the
script
ran) and then the following 11 Wednesdays.
SELECT * FROM christian_discipleship WHERE created_for_date =
'$next_wednesday' ORDER BY created_for_date ASC LIMIT 12
I am not sure how to generate the value for $next_wednesday
Any ideas?
Ron