views:

56

answers:

3

I'm trying to update two query's in my php script but i can't get it to work. The code is:

UPDATE table SET price = '14.50' WHERE type LIKE 'finger', 'Knuckle' AND quantity <=50;

Okay, ive fixed the WHERE clause but i don't understand what i need to change with the '14.50' part which is now picking up an error?

+1  A: 
UPDATE table SET price = '14.50' WHERE (type LIKE 'finger' OR type LIKE 'Knuckle') AND quantity <=50;
bdonlan
+4  A: 
UPDATE table SET price = '14.50'
WHERE type IN('finger', 'Knuckle') AND quantity <=50;
thomasrutter
A: 

you may also want

update table set price = '14.50'
where (type like '%finger%' or type like '%knuckle%')
and quantity <= 50

This will match any strings in which finger or knuckle are contained.

Nathan Feger