in reply to Perl DBI Mistaking a Number For a String

Check out This thread for lots of info on placeholders in LIMIT clauses.

http://www.issociate.de/board/post/9336/LIMIT_clause_and_placeholders.html

Ideally you should not use placeholders in LIMIT clauses, because most databases that actually prepare statements will not support them. Of course if you are married to MySQL, that won't make too much of a difference, barring MySQL changing things.

- Cees

  • Comment on Re: Perl DBI Mistaking a Number For a String

Replies are listed 'Best First'.
Re^2: Perl DBI Mistaking a Number For a String
by {NULE} (Hermit) on Apr 21, 2005 at 19:36 UTC
    Good information. You'll be happy to know that this is an old script and going away. I actually only needed it for one last run to archive off an old table. :) I've made a note to avoid placeholders in limit clauses in the future.

    Thanks,

Re^2: Perl DBI Mistaking a Number For a String
by dragonchild (Archbishop) on Apr 21, 2005 at 19:43 UTC
    Of course if you are married to MySQL, that won't make too much of a difference, barring MySQL changing things.

    Do you mean like this?