[SOLVED] mySQL UPDATE query returns "0 rows affected"

Issue

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.

Solution

If the such value already exists, mysql won’t change it and will therefore return "0 rows affected". So be sure to also check the current value of called

Answered By – Dan Soap

Answer Checked By – Candace Johnson (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.