What is the difference between PDOStatement::bindParam() and PDOStatement::bindValue()?
You don't have to struggle any longer, when there exists a way lilke this:
$stmt = $pdo->prepare("SELECT * FROM someTable WHERE col = :val"); $stmt->execute([":val" => $bind]);