Re: Re: Insert?

From: Date: Thu, 26 Oct 2000 12:10:41 +0000
Subject: Re: Re: Insert?
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-22118@lists.php.net to get a copy of this message
I always use: $addsmt = "INSERT INTO PhoneType SET ID='1', Type=Business "; It is a little more coding up front, but if I add another column to the end of my tables, or delete a column (as long as it isn't used in the query of course), I don't have to go back through and rewrite all of my queries... Brian > If ID is an autoincrement, the following would be better: > > "INSERT INTO PhoneType (Type) Values('Business')"; > > ----- Original Message ----- > From: "Wee Chua" <Chua@mail.interclean.com> > To: "MySQL (E-mail)" <mysql@lists.mysql.com>; "PHP (E-mail)" > <php-general@lists.php.net> > Sent: Wednesday, October 25, 2000 4:43 PM > Subject: Insert? > > > > Hi all, > > What is the correct syntax for inserting statement for PHP? Is anything > > wrong with this statement? > > > > $addsmt = "INSERT INTO PhoneType (ID,Type) > > Values('1','Business')"; > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#22118) next »