Re: Re: mysql statement (still a semi newbie)

From: Date: Wed, 14 Aug 2002 22:39:21 +0000
Subject: Re: Re: mysql statement (still a semi newbie)
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-112615@lists.php.net to get a copy of this message
I'm always making my inserts like this: $Insert = "INSERT INTO basket_db (name, image_id, customer_id, session_id) "; $Insert .= "VALUES ('$name', '$image_id', '$customer_id', '$PHPSESSID')"; ...and I'm using the SET Field = '$Value' in the Update Querys like this: $UpdateQuery = "UPDATE produkt "; $UpdateQuery .= "SET produkt_name = '$produkt_name', "; $UpdateQuery .= "size = '$size', kategorie = '$kategorie' "; $UpdateQuery .= "WHERE produkt_key = '$produkt_key'"; hope it helps someone out ;o) Schura ----- Original Message ----- From: "Tim Stoop" <tim@cidev.nl> To: <php-general@lists.php.net> Sent: Wednesday, August 14, 2002 11:00 PM Subject: [PHP] Re: mysql statement (still a semi newbie) > Alexander Ross wrote: > > > That first column is an auto_incrementing column so i don't want any data > > INSERT INTO cast VALUES(DEFAULT, 'Rick', 'Blaine', > > 'Humphrey', 'Bogart', > > 'male'); > > I think you need to use NULL instead of DEFAULT... I'm not 100% sure. Just > try it :) > > -- > Kind regards, > Tim > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#112615) next »