I had a problem with prepare/execute when passing offset/limit to mysql it
was trying to quote the integers which mysql didn't like. I had to patch it
not to add quotes if the value was an integer, while a performace hit it
might be a good idea to do type checking and quote only selective data
types. This was a while ago maybe it's fixed but anyhow
Placeholders really are intended only for column values, not things
like table or column names or places like LIMIT where constants are
required.
You could just interpolate the limit value directly into the query string
without using placeholders.
ex
SELECT *
FROM TAB
WHERE id=?
LIMIT ?,?
would turn into
SELECT *
FROM TAB
WHERE id='5'
LIMIT '20', '5'
--
Paul DuBois, paul@snake.net