Hi. I am trying to update one field in my table in MySQL. I cannot get this field to update. Can someone possibly tell me what is wrong with my SQL statement?
$SQL="UPDATE umcritsurv SET IQ_Use_Q9='$IQ_Use_Q9' WHERE fldAuto='54'";
Well, actually, it doesn't give me any errors. It moves on to the next page as though it has inserted it into my database. But when I look, the info for that field is still blank.
That page will tell you what return from mysql_query() to expect when the function returns an error.
It may also be that the query is well-formed, yet simply does not affect any records. If I use a statement like "UPDATE foo SET bar=3 WHERE baz=4" and no records have a column baz containing the value 4, then no records will be updated.
I also have a FAQ in the PHP forum on debugging code: faq434-2999
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.