PDO query is always returning 1 or true
问题 I am trying to check if a row exists before I delete it. The row in my table doesn't exist but it always returns 1 : $orders = $this->db->prepare("SELECT * FROM orders WHERE id=? AND user=?"); $check = $orders->execute(array($message,$this->model->checkapi($data,$message))); echo $check; if($check){ $deleteorder = $this->db->prepare("DELETE FROM orders WHERE id=? AND user=?"); $deleteorder->execute(array($message,$this->model->checkapi($data,$message))); array_push($result, array('success' =>