RE: [PHP] UPDATE syntax

From: Date: Mon, 13 Aug 2001 19:24:10 +0000
Subject: RE: [PHP] UPDATE syntax
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62485@lists.php.net to get a copy of this message
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 try this syntax: UPDATE table SET col=value, col2=value2 ... WHERE ID=$id; > -----Original Message----- > From: Gerard Samuel [mailto:trini0@optonline.net] > Sent: Monday, August 13, 2001 3:20 PM > To: PHP > Subject: [PHP] UPDATE syntax > > > I have a database with 5 columns and cols 1,2,3 & 5 are filled. I want > to insert into 4 and change 5. Could I use an UPDATE command to do > this.. Here is what I have ==> > > $query = "UPDATE mpn_asklee (Reply, Post) VALUES > ('$Reply[$i]', '$post[$i]') WHERE ID = '$counts'"; > $result = mysql_query($query); > > If Im talking jibberish, let me know.. > > > -- > 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 -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBO3gpWsaXTGgZdrSUEQIQhQCg2bPek8JQFQYtMsl0+ltUrYu1jVAAmwf4 FQP9++hgdLDuHup2v7aUij5n =B6jL -----END PGP SIGNATURE-----

« previous php.general (#62485) next »