0
How can I query in several columns the value equal to the field using PDO
$PDO = db_connect();
$busca = $_POST['campo'];
$vbusca = array("%$busca%");
$sql = 'SELECT * FROM livro AS t WHERE nome LIKE ?';
$stmt = $PDO->prepare($sql);
$stmt->execute($vbusca);
$total = $stmt->rowCount();
Have you tried writing the
like
for each column you wish to consult?– Woss
Would not cause conflict with the execution?
– Teresa Santos