I copied the code from here and made minimal changes
DELIMITER $$
CREATE PROCEDURE updateTable (IN list_of_ids VARCHAR(32))
BEGIN
set @sql = concat("SELECT (" , list_of_ids, ")");
PREPARE stmt FROM @sql;
EXECUTE stmt;
END$$
call updateTable('1,2,3');
But when I call I get Error 1241: Operand should have one 1 column(s)
I've used " instead of ' around the parameter and it still gave the same error. I also tried to declare a variable with the "1,2,3" string and it still failed, and I tried to call updateTable(concat("1,","2,","3")); to no avail.
I also tried to change the procedure to expect 3 parameters and I get the expected error Error 1318: Incorrect number of arguments
This is all being done in MySql if anyone knows what I'm missing, thanks! I've been googling for an answer all night.