Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • execute() calls bind_param for each argument. Which means it'll bind parameters every time you call execute() if you do it that way. If you instead are able to call bind_param() just once to bind the SQL placeholders to variables, and execute() with no arguments (then change the value of the variables, call execute() again, etc.), you save those extra implicit calls to bind_param(), which makes it slightly more efficient to do it this way...slightly...I think (...someone please prove me wrong). But his rea
    • I'm wrong:

      The "bind_param" method takes a copy of $bind_value and associates...

      You're binding a copy of the value, not the variable itself (like with bind_columns). I'm way off.

      • Yeah, plus internally the DBD implementations do all this work in C, they don't tend to have much access to the perl level.

        It's also worth noting that this is entirely DBD driver dependent. I believe old versions of the MySQL DBD used to bind the variables into the string sent to the database because MySQL had no bind param support (it does now, IIRC).