Hello!
How to send a request for sampling with the participation of LIMIT'a through PDO, using an array and without the participation of bind'a?
I try this:
$array_db = Array(0, 10); $sql = $db->prepare("select * from `table` limit ?, ?"); $sql->setFetchMode(PDO::FETCH_ASSOC); $sql->execute($array_db); $row = $sql->fetchAll(); As a result, it gives an error: SQLSTATE [42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the syntax for your right syntax to use the '' 0 ',' 10 '' at line 1
Thank!
$array_db = Array((int)0, (int)10);won't work either? - Visman