$query = "UPDATE `users` SET `picture` = '$file_name' WHERE `username` ='$username'"; echo "debug: functions $query"; mysql_query($query); echo mysql_error(); echo mysql_info(); PHP: results in: debug: functions UPDATE `users` SET `picture` = 'blahblah3964.gif' WHERE `username` ='blahblahusername'Rows matched: 1 Changed: 1 Warnings: 0 and yet...no rows were changed! I checked the entire database! picture is a varchar, by the way. and file_name is a string.
Hmm, I'm not sure on that one, you could try updating the query like this: $query = sprintf("UPDATE `users` SET `picture` = '%s' WHERE `username` ='%s'", mysql_real_escape_string($file_name), mysql_real_escape_string($username)); PHP: Try printing the relevant portion of the db before and after the change to see if there is any difference whatsoever. Maybe set $blah = mysql_query($query); and verify $blah is okay?
Without seeing the real error, it impossible for us to tell. Turn up your error reporting, paste the actual query here and in phpMyAdmin to see what errors they give you. As Gordaen suspects, it's probably a malformed string.