I am attempting to delete a row from my DB.I am using inputs from the user and I need to be able to sanitize using the prepared statement.
The query itself looks like -
DELETE FROM wp_thing_assignment WHERE (account_number,user) values (1, 'DudeDev')
I am using the following code -
$success = $this->wpdb->query($this->wpdb->prepare(
"DELETE FROM $this->table_name WHERE
(account_number,user)
values (%d, %s)",
array ( $this->company[$i], $this->employee)
));
I get this error -
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'values (1, 'USER')' at line 1
Is there any way to salvage this query?