Re: php-db Digest 7 Oct 2006 03:29:53 -0000 Issue 3503

From: Date: Sat, 07 Oct 2006 04:52:34 +0000
Subject: Re: php-db Digest 7 Oct 2006 03:29:53 -0000 Issue 3503
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42501@lists.php.net to get a copy of this message
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@lists.php.net 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


« previous php.db (#42501) next »