I have this query:
UPDATE phonecalls
SET Called = "Yes"
WHERE PhoneNumber = "999 29-4655"
My table is phonecalls, I have a column named PhoneNumber. All I want to update is a column named Called to "yes".
Any idea what I am doing wrong? when I return my query it says 0 rows affected.
解决方案
As amphetamine and Yada suggested, check with a SELECT, if your phone number is in the table.
But keep in mind: If the value for called of the row in question is already "Yes", mysql won't change the value and will therefore return "0 rows affected". So be sure to also check the current value of called