PHPBeginner.com wrote:
> I am not sure on how your possibilities are,
> but doing this in PHP means literally "adding useless lines and loops"
>
> If possible, do it with SQL queries. Read the documentations on date
> datatypes, this is so much easier... almost magic.
>
AND
> You can (mySQL, right?) do the following:
>UPDATE table SET date=(date+INTERVAL 10 DAYS);
>so if date there was 04-28, it will be added 10 more days and so will
>become
>05-08
>Use SQL for this things, it treats dates as 'dates' while PHP treats them
>as
>integers and strings.
Sounds even easier. But what if I'm not doing an UPDATE but an INSERT? Can
it read the previous date? I am inserting a batch of bookings at one time.
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]