When I want to find a value from a row using PDO I use the following method:
//Search whether user exists $sqlQueryEmailLogin = $dbh->prepare(\"SELECT ven
Try the following
$sql = "SELECT * FROM articles WHERE id = :id AND status = :status"; $stmt = $conn->prepare($sql); $stmt->bindValue(':id', $id); $stmt->bindValue(':status', $status); $stmt->execute();
See docs http://php.net/manual/en/pdostatement.bindvalue.php