How Do I Create A Loop For This....

Hi,

I’m trying to create a loop that will run through a MySQL database up to a certain date only, then stop.

I’m really only familiar with while loops.

Can I use a ‘for’ or a ‘do…while’ loop, running through the rows of my database?

Or what’s the best way to go about doing this?

Do it in your query:

[php]
select id,title,text,author
from table
where date >= [start date] and date <= [end date]
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service