The following statement written in php for a mysql database always brings me the error "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''10'' at line 1'".
('SELECT `creator`,`created`,`content`
FROM mytable
WHERE `groupid`=?
ORDER BY `created` DESC
LIMIT ?', $foo, 10)
When I replace the questionmark with a number, it works.
Where is my mistake?