Grabeorama Posted May 24, 2009 Share Posted May 24, 2009 Here is my code: $sql = "UPDATE php_members SET name = '$name' WHERE id = '$id' "; How do you set more than one column?I have read the W3S tutorial, but it only shows how to update one.Thanks~Grabeorama Link to comment Share on other sites More sharing options...
jeffman Posted May 24, 2009 Share Posted May 24, 2009 SET column1=value, column2=value2, etc. Link to comment Share on other sites More sharing options...
Grabeorama Posted May 24, 2009 Author Share Posted May 24, 2009 Oh, I should have tried that...Thanks! Link to comment Share on other sites More sharing options...
samXR Posted May 25, 2009 Share Posted May 25, 2009 SET column1=value, column2=value2, etc.hi hi..can you be more specific bout this>>>>>>>SET column1=value, column2=value2, etc.thank u..i too have this problem.. Link to comment Share on other sites More sharing options...
jeffman Posted May 25, 2009 Share Posted May 25, 2009 To update multiple columns in a row, separate the column=value statements by commas. (Be sure to identify the correct row with a WHERE clause.) Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.