I’m trying to build the next stored proc but it’s not working.
PREPARE STMT FROM 'SELECT a, b, c, d, e FROM TABLE_1 WHERE (`a` like `%?%` OR `b` like `%?%` OR `c` like `%?%` OR `d` like `%?%` OR `e` like `%?%`) LIMIT ?, ?';
EXECUTE STMT USING @search, @skip, @rows;
Basically, I’m trying to search for a string inside one of the columns and return the rows with the columns who fits.
Please help me fix it since I’m getting the next error:
Unknown column '%?%' in 'where clause'
This is because the number of ? should be equal to number of parameters after
USINGclause. also you have given wrong quotes ? instead of"?"try:or try