Re: Why won't this query work?

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

 



On Mon, Mar 24, 2008 at 1:47 PM, Jason Pruim <japruim@xxxxxxxxxx> wrote:
> Hi Everyone,
>
>  Attempting to get this query:
>  "SELECT customerName, loginName, email, adminLevel FROM current WHERE
>  customerBusiness=$business ORDER BY adminLevel"
>
>  to work.
>  So far it doesn't like me... It pops up saying that  "Unknown column
>  'Raoset' in 'where clause'"
[snip!]

    Encapsulate your $business variable in quotes.  If you don't,
MySQL sees it as a relational link.

    Also, as a reminder, be sure to use
mysql_real_escape_string($business) if you're not using mysqli_*().

-- 
</Daniel P. Brown>
Forensic Services, Senior Unix Engineer
1+ (570-) 362-0283

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux