$offset = ($page - 1) * 10;
$notices = db()->query('SELECT id, topic, address, date FROM notice ORDER BY id DESC LIMIT 10 OFFSET ?')->bind($offset)->fetchAll();
Results in:
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0'' at line 1
To Reproduce
Use the above code.
Expected behavior
It should correctly bind the integer variables to the sql query.
Describe the bug
Results in:
To Reproduce
Use the above code.
Expected behavior
It should correctly bind the integer variables to the sql query.