RE: [PHP] PHP/MySQL

From: Date: Mon, 12 Nov 2001 09:57:38 +0000
Subject: RE: [PHP] PHP/MySQL
Groups: php.general 
Request: Send a blank email to php-general+get-74246@lists.php.net to get a copy of this message
Try putting single quotes around the strings: $Query = "INSERT INTO table_name (Obj,Descrip) VALUES ('keyboard','Device to pound on when frustrated.')"; Another thing that would be useful is to use the mysql_error() function in your die, which will give a better indication of the problem -----Original Message----- From: phantom [SMTP:phantom@phantomcougar.com] Sent: 12 November 2001 09:50 To: php-general@lists.php.net Subject: [PHP] PHP/MySQL New to this, trying to insert record into DB $Query = "INSERT INTO table_name (Obj,Descrip) VALUES (keyboard,Device to pound on when frustrated.)"; $Results = mysql_query($Query) or die ("Query FAILED"); I keep getting Failed Query messages here, any idea why? PHP/MySQL manuals do not have examples of how to do this. Thanks. -- 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 (#74246) next »