RE: Query Help...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Scott,

'Group' is a reserved word so you can't use it for a column name. try
changing it to 'groups' or soething else that makes sense but is safe.

George

> -----Original Message-----
> From: NIPP, SCOTT V (SBCSI) [mailto:sn4265@sbc.com]
> Sent: 10 March 2003 5:24 pm
> To: 'php-db@lists.php.net'
> Subject:  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
>
> 	I am wondering if for some reason group is trying to be
> interperetted as the "GROUP BY" MySQL function?  I am running PHP 4.2.3
> against a MySQL DB on an Apache 1.3.27 server.  Thanks in advance for the
> help.
>
> Scott Nipp
> Phone:  (214) 858-1289
> E-mail:  sn4265@sbc.com
> Web:  http:\\ldsa.sbcld.sbc.com
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux