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

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

am 07.10.2006 06:52:34 von Frank Flynn

--Apple-Mail-1--646555698
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=US-ASCII;
delsp=yes;
format=flowed

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
>


--Apple-Mail-1--646555698--