×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Liberato Malvasi
Added: Apr 16, 2019 7:49 AM
Views: 3827
Tags: no tags
  1. $mysqli = $this->DbConnect();
  2. $sql = "UPDATE `tbl` SET `campo1` = ?, `campo2` = ? WHERE `condizione` = ?";
  3. $stmt = $mysqli->prepare($sql) or trigger_error($mysqli->error, E_USER_ERROR);
  4. $stmt->bind_param('sii', $campo1, $campo2, $condizione);
  5. $stmt->execute() or trigger_error($stmt->error, E_USER_ERROR);
  6. $mysqli->close();