Guest User

Untitled

a guest
Nov 14th, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. mysqli_stmt_bind_param($post, 'ssssssssss', $key[0], $value[0], $key[1], $value[1], $key[2], $value[2], $key2[0], $value2[0], $key2[1], $value2[1]);
  2.  
  3. public function update($table, $data, $conditions, $comparator) {
  4. $key = array_keys($data);
  5. $value = array_values($data);
  6. $key2 = array_keys($conditions);
  7. $value2 = array_values($conditions);
  8. $post = mysqli_prepare($this->mysqli, "UPDATE $table SET ? = ?, ? = ?, ? = ? WHERE ? = ? $comparator ? = ?");
  9. mysqli_stmt_bind_param($post, 'ssssssssss', $key[0], $value[0], $key[1], $value[1], $key[2], $value[2], $key2[0], $value2[0], $key2[1], $value2[1]);
  10. mysqli_stmt_execute($post);
  11. }
Add Comment
Please, Sign In to add comment