vwinstead Posted February 5, 2009 Share Posted February 5, 2009 I know this doesn't work because I tried it, but what is the correct format for changing the value of a field for a specific line according to an "id" number: $query = "INSERT INTO contents (body) VALUES ('$postedValue') WHERE id=0"; So far I've only been able to INSERT a whole new line, but I don't want to do that, I want to change the value of the "body" field in the line corresponding to an "id" value of zero. Quote Link to comment Share on other sites More sharing options...
flyhoney Posted February 5, 2009 Share Posted February 5, 2009 UPDATE contents SET body = '$postedValue' WHERE id = 0 Quote Link to comment Share on other sites More sharing options...
Snart Posted February 5, 2009 Share Posted February 5, 2009 "UPDATE body SET contents = '$postedValue' WHERE id=0" Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.