I'm using mysqli, and I have this query:
$q = "SELECT col1, col2 FROM `Something` WHERE col2 LIKE '%?%'";
The same query works fine if I query it outside of PHP with a word in place of ?. Within PHP, I can't do this. The error I'm getting is:
mysqli_stmt::bind_param(): Number of variables doesn't match number of parameters in prepared statement[..]
The query is outputting fine in var_dump(), as is the parameter itself.
Here's the bind_param():
$stmt->bind_param("s", $param);
What am I doing wrong?