I have the following code
$damn = '%'.$busqueda.'%';
$q_i = $this->pdo->prepare('SELECT * FROM registro_viaje WHERE (id_pas_reg LIKE ? OR nomc_pas_reg LIKE ? OR tel_pas_reg LIKE ?) AND matricula_veh_reg=?');
$q_i->bindParam(1,$damn);
$q_i->bindParam(2,$damn);
$q_i->bindParam(3,$damn);
$q_i->bindParam(4,$matricula);
$q_i->execute();
$q_r = $q_i->fetchAll();
if (count($q_r)>0) {
print_r($q_r);
}else{
echo "Nada, papú :(";
}
In the database, there is information about Felipe Solano , so $ search is equal to "Felipe", when you start the code it turns out that there are no results. .. NOTESE the use of LIKE , what am I missing here?