in reply to Re: More on selecting rows with DBI...
in thread More on selecting rows with DBI...

Actually, I don't think the binding of the value is that much of an issue with MySQL. According to the Appendix in the DBI book, MySQL doesn't actually support bound variables--the use of placeholders is merely emulated by DBI. Can anyone who actually has the DBI book confirm this? :)
  • Comment on RE: Re: More on selecting rows with DBI...

Replies are listed 'Best First'.
RE: RE: Re: More on selecting rows with DBI...
by chromatic (Archbishop) on May 02, 2000 at 20:19 UTC
    The MySQL book (Paul DuBois) explicitly states that queries aren't cached, in the section on placeholders.

    He also says that you might as well use them, because if you port to another database, you might get the benefit there. I'd add that they make your queries easier to read and they do quoting for you automatically. Save yourself some trouble.

      Oh, yes, I definitely would recommend using bind variables. :) It's just that in this particular case of MySQL-specific syntax (LIMIT [offset], rows), it's worthwhile to note that MySQL doesn't actually support bound variables; so it's not an issue in this *particular* case.

      In general, though, it's *highly* recommended.