Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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]);
- public function update($table, $data, $conditions, $comparator) {
- $key = array_keys($data);
- $value = array_values($data);
- $key2 = array_keys($conditions);
- $value2 = array_values($conditions);
- $post = mysqli_prepare($this->mysqli, "UPDATE $table SET ? = ?, ? = ?, ? = ? WHERE ? = ? $comparator ? = ?");
- 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]);
- mysqli_stmt_execute($post);
- }
Add Comment
Please, Sign In to add comment