I'm using PDO bindValue to search terms through my database. Is my syntax all wrong? I'm not getting the result I'm supposed to
$term = $_GET['s'];
$s_pdo = $dbh->prepare("SELECT * FROM table WHERE value = ':search'");
$s_pdo -> bindValue(':search',"%".$term."%",PDO::PARAM_STR);
$s_pdo -> execute();
while($s_row = $s_pdo->fetchAll(PDO::FETCH_ASSOC)){
echo $s_row['value'];
}
Does anyone see anything wrong here? I do have the value in my mysql. I'm matching exactly in mysql to test if my search function works.
Thanks!