RE: [PHP] MSSQL Query syntax problem?

From: Date: Thu, 16 Nov 2000 08:32:33 +0000
Subject: RE: [PHP] MSSQL Query syntax problem?
Groups: php.general 
Request: Send a blank email to php-general+get-25652@lists.php.net to get a copy of this message
you don't need that ';' at the end of your query. additionally you could change your double quotes to single quote without escaping them, better for eyes: mssql_query("INSERT INTO tbl_news (date,time,head,content,urgent) VALUES ('$datum','$tid','$head','$content',$urgent)") or die("Invalid Query"); Cheers, Maxim Maletsky -----Original Message----- From: Ivanoff Jari [mailto:Jari.Ivanoff@autonova.se] Sent: Thursday, November 16, 2000 5:22 PM To: 'PHP' Subject: [PHP] MSSQL Query syntax problem? When I run this query: mssql_query("INSERT INTO tbl_news (date,time,head,content,urgent) VALUES (\"$datum\",\"$tid\",\"$head\",\"$content\",$urgent);" ) or die("Invalid Query"); I get this errormessage: Warning: MS SQL message: Line 1: Incorrect syntax near ')'. (severity 15) in D:\Inetpub\intranet.autonova.se\uddevalla\news\newsin.php on line 9 I can't see anything obvious, but then I am a newbie to this. I have tried with and without the ; inte the sql statement. Please help me! /Jari Ivanoff -- 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 (#25652) next »