Re: Query Help...

From: Date: Mon, 10 Mar 2003 17:38:40 +0000
Subject: Re: Query Help...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-26237@lists.php.net to get a copy of this message
----- Original Message ----- From: "NIPP, SCOTT V (SBCSI)" <sn4265@sbc.com> To: <php-db@lists.php.net> Sent: Monday, March 10, 2003 9:23 AM Subject: [PHP-DB] Query Help... > I am having a lot of trouble with a query that works fine from a > basic SQL command line, but fails in my web script. Here is the portion of > code including the query: > > mysql_select_db($database, $Prod); > $query_groups = "SELECT name FROM group"; > $groups = mysql_query($query_groups, $Prod) or die(mysql_error()); > > Here is the error I am receiving: > > You have an error in your SQL syntax near '"group"' at line 1 > Have you tried using backticks in your query? E.g., $query_groups = "SELECT name FROM group"; -- rob

« previous php.db (#26237) next »