My PHP Mysql query isnt working?

BigD

New member
$result3 = mysql_query("SELECT tbl_addedItemCustomerPrices.price FROM tbl_addedItemCustomerPrices, tbl_items
WHERE tbl_addedItemCustomerPrices.itemId = tbl_items.id
AND tbl_items.id = $id
AND tbl_addedItemCustomerPrices.customerid = $customerid
AND tbl_addedItemCustomerPrices.overall_company = $currentCompany
") or die(mysql_error());

the error is "right syntax to use near 'AND tbl_addedItemCustomerPrices.overall_company = 1' at line 5"
omfg yahoo answers fails, there supposed to be things where the 3 periods are...

but i fixed it, $cusomerid was empty
 
Back
Top