Lord, good day! Faced a strange problem. There is a method
public function getResultArray($mode = PDO::FETCH_ASSOC) { $stmt = $this->db_conn->prepare("SELECT * FROM table LIMIT ?"); if (!$stmt->execute(array('1'))) var_dump($stmt->errorInfo()); } Var dump gives the following error:
array (3) {[0] => string (5) "42000" [1] => int (1064) [2] => string (149) "check syntax; check the manual that corresponds MySQL server at line 1 "}
If the hands instead of the placeholder enter 1 then it is executed correctly. I do not understand what is wrong here
As a result, it is planned to return the result of FetchAll, but for clarity of the question, the function simplified