Where's the mix-up?

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

 



Help:

<snip>
$sql = "select id1 from GCN_Salesmen where username = '$PHP_AUTH_USER'";
$user_id = mysql_query($sql) or die(mysql_error());
</snip>

Produces: You have an error in your SQL syntax near 'id #2' at line 1

<snip>
$sql = "select id1 from GCN_Salesmen where username = $PHP_AUTH_USER";
$user_id = mysql_query($sql) or die(mysql_error());
</snip>
Produces: Unknown column 'robert' in 'where clause'

I have even tried like instead of = and still getting errors.  I know
this is a stupid error, but...


Thanks,
Robert

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Money is like manure - it is meant to be spread around. 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
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