How can I do a SELECT in MYSQL with PDO next to it below:
$buscarNoticiaTitulo = "noticias.titulo LIKE '%teste%'";
$sqlNoticias = $pdo->prepare('SELECT * FROM noticias WHERE :buscarNoticiaTitulo');
$sqlNoticias->execute(array("buscarNoticiaTitulo" => $buscarNoticiaTitulo));
$resultadoSqlNoticias = $sqlNoticias->fetchAll();
The above example does not give any error, but does not return anything. If I do without PDO it returns the news with the title "Test 123 Testing Test"