Jump to content

[SOLVED] updating multiple columns with mysqli prepared statements


ricmetal

Recommended Posts

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);

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.