JianYA JianYA - 1 year ago 74
SQL Question

SQL update with multiple criteria

I know this is quite simple but I've been looking at this for awhile and can't seem to identify what the issue is. I want to update a row in a table using two criteria. When I use either criteria, the table updates fine but when I combine them, it doesn't work.

This is the query

$updatequery = "UPDATE query SET audio='$finalpath' WHERE content='$title' AND WHERE userid LIKE '%$regID%'";

An example of the reg id:


An example of content :
Where can I find a car

Answer Source
WHERE content='$title' AND userid LIKE '%$regID%'

Where is needed only once