PHPBeginner.com wrote:
>
> INSERT INTO table SELECT date+INTERVAL 10 DAYS AS date FROM table WHERE
> bla=bla;
>
> it is just a way to do it. you will definitely have to play with it.
>
> However you can easily make two queries to read the previous date
> combining it with INTERVAL and then do an insert.
I've looked at INTERVAL but it seems it only deals with one specific date
at a time?
date=10 : SELECT date+INTERVAL 10
would then mean date=20
Or have I got everything wrong?
What I looking at
from the value of date=10 ADD other dates for X days on, like this
(in a table, each record (row) has more data than the one given)
date=2001-04-10
date=2001-04-11
date=2001-04-12
This, if I'm mistaken can't be done with interval, at least not without
looping in PHP? And using two queries would not perhaps save as much code
as the way I solved it? Could be mistaken of course.
Martin S.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]