Multiple &(AND) fails in query
Posted
by
N e w B e e
on Stack Overflow
See other posts from Stack Overflow
or by N e w B e e
Published on 2013-11-04T21:46:28Z
Indexed on
2013/11/04
21:53 UTC
Read the original article
Hit count: 126
here is my query
$sql = 'SELECT *
FROM Orders
INNER JOIN [Order Details] ON Orders.OrderNumber = [Order Details].OrderNumber
WHERE
Orders.CartID =2
AND [Order Details].Option10 Is Null
AND [Order Details].Status="Shipped"';
this queries when entered in MS_Access sql view, returns the correct results, but when I copy and paste the same query in my php script, it fails and gives the error
Too few parameters, expected 1...
although data is there, query is working in access...
Please note if I omitted on AND
condition, it works eg if I removed shipped
conidtion or is null
condition, it works then too..
any hint? whats wrong with it?? any help?thanks
© Stack Overflow or respective owner