RE: [PHP] mysql statement (still a semi newbie)
| From: | vic | Date: | Wed, 14 Aug 2002 20:58:12 +0000 |
| Subject: | RE: [PHP] mysql statement (still a semi newbie) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-112602@lists.php.net to get a copy of this message | ||
U must write:
mysql_query(INSERT INTO cast SET Rick='$Rick', Blaine='$Blaine',
Humphrey='$Humphrey', Bogart='$Bogart', male='$male');
The stuff with the $ before them are variable that contain the info u
want to put into the word that don't have the $ those words are the
cells in your database.
I don't know about the DEFAULT thing or the VALUES thing.
- Vic
-----Original Message-----
From: Alexander Ross [mailto:alexross@bleen.net]
Sent: Wednesday, August 14, 2002 4:50 PM
To: php-general@lists.php.net
Subject: [PHP] mysql statement (still a semi newbie)
What is wrong with the statement below? Am I using DEFAULT incorrectly?
That first column is an auto_incrementing column so i don't want any
data to
get inserted there. Thanks for you help.
INSERT INTO cast VALUES(DEFAULT, 'Rick', 'Blaine', 'Humphrey',
'Bogart',
'male');
Thanks!
Alex
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
______________________________________________________________________
Post your ad for free now! http://personals.yahoo.ca