[PHP-DB] Date Manipulation

2004-03-21 Thread Shannon Doyle
Hi People,

Need some assistance in the following scenario:-

Inserting a date into the database that is entered into a form by the site
visitor. - This is easy enough.

However I now need to use the same date that has been entered by the site
visitor add 35 days and then insert into another table.

My question, how do I get the date entered into the form add 35days to it
and then include that into the same sql query as the first one. Or do I have
to use a second sql query? If the second query how would I get the date and
add 35days??


Cheers,

Shannon

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Date Manipulation

2004-03-21 Thread John W. Holmes
Shannon Doyle wrote:

My question, how do I get the date entered into the form add 35days to it
and then include that into the same sql query as the first one. Or do I have
to use a second sql query? If the second query how would I get the date and
add 35days??
INSERT INTO table (date1, date2) VALUES (20040321, 20040321 + INTERVAL 
35 DAY)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals  www.phparch.com

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php