ricmetal Posted April 21, 2009 Share Posted April 21, 2009 so how do i do it? all i find is how to update one column ive tried SET (col1,col2) VALUES ($var1, $var2) WHERE... and SET col1 = ?, col2 = ? WHERE but these havent worked appretiate help Quote Link to comment Share on other sites More sharing options...
soak Posted April 21, 2009 Share Posted April 21, 2009 This shows you what you need to do: http://uk3.php.net/manual/en/mysqli-stmt.bind-param.php If you're asking for help with the update syntax it's: UPDATE `table` SET `field` = 'value', `field2` = 'value2' WHERE `field3` = 'value3' Quote Link to comment Share on other sites More sharing options...
Mchl Posted April 21, 2009 Share Posted April 21, 2009 Too little code to help. Quote Link to comment Share on other sites More sharing options...
ricmetal Posted April 21, 2009 Author Share Posted April 21, 2009 sorry, i got it working it was a missing 's' i just asked cause i didnt find this exaxmple online, and was guessing $stmt = $mysqli->prepare("UPDATE table SET col1 = ?, col2 = ?, col3 = ? WHERE id = ? ") $stmt->bind_param('sssi', $var1, $var2, $var3, $id); 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.