Hello I try to make this prepared statement but the problem is that
"$search" is in fact not inserted by bindparam. Could you explain me the
reason, and tell me how could i make this prepared statement. Thank you very much.
Here is the code:
$query = $bdd->prepare('SELECT * FROM produits WHERE nom LIKE :search LIMIT :entry, :item_per_page') Or die(print_r($bdd->errorInfo()));
$query->bindParam('search', $search, PDO::PARAM_STR);
$query->bindParam(':entry', $entry, PDO::PARAM_INT);
$query->bindParam(':item_per_page', $item_per_page, PDO::PARAM_INT);
$query->execute();