I’m attempting to push some knowledge to a customized desk in my WordPress set up, however I get the error The question doesn't comprise the right variety of placeholders
and I am undecided why. Right here is my question:
$sql = $wpdb->put together(
'INSERT INTO merchandise
(`title`, `shade`, `value`)
VALUES
(%s, %s, %s)
ON DUPLICATE KEY UPDATE
value = %s',
$title,
$shade,
$value
);
$wpdb->question($sql);
The precise error is that this:
Discover: Perform wpdb::put together was referred to as incorrectly. The question does
not comprise the right variety of placeholders (4) for the variety of
arguments handed (3).
I’m not certain why it’s on the lookout for 4 placeholders, as a result of I’m solely attempting to insert/replace 3 columns, so it ought to solely be on the lookout for 3 placeholders/arguments.