Forum Moderators: coopster
I am using following code
$sth = $dbh->prepare("SELECT *
FROM qna
WHERE q LIKE '%:qu%'");
$quo = "what";
$sth->bindParam(':qu', $quo, PDO::PARAM_STR,4);$sth->execute();
$result = $sth->fetchAll();
print_r($result);
it is giving me EMPTY array
Array()
as an output
while if I execute the same array with replacing :qu with "what" word it shows me all fetched records.
Can anybody guess where am I doing wrong?
thank you!