Multiple update

I am trying to update two requests in my php script, but I cannot get it to work. The code:

UPDATE Table SET price = '14 .50 'WHERE type LIKE' finger ',' Knuckle 'AND ALSO quantity <= 50;

Ok, ive fixed the WHERE clause, but I don't understand what I need to change with the "14.50" part now getting the error?

0


a source to share


3 answers


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

      



+4


a source


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

      



+1


a source


you may also need

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

      

This will match any lines that contain a finger or joint.

0


a source







All Articles