metaperl has asked for the wisdom of the Perl Monks concerning the following question:

In this part of the SQL::Interp docs, we see:
my $sth; for my $href (@array_of_hashrefs) { my @list = ('SELECT * FROM mytable WHERE', $href); my ($sql, @bind) = sql_interp @list; if (! defined $sth || $sth->{Statement} ne $sql) { $sth = $dbh->prepare($sql); } $sth->execute(@list); ###### <------ SAY WHAT?!!!!! $sth->fetchall_arrayref(); }
but shouldnt you execute against bind variables (@bind) and not @list?

Replies are listed 'Best First'.
Re: SQL::Interp doc issue
by kennethk (Abbot) on Jan 23, 2009 at 16:16 UTC

    Based upon the documentation for sql_interp, it sounds like you've caught a typo in the documentation.

      And to follow up on this, metaperl, if it is a typo, please submit a patch with the corrections.

      --MidLifeXis

Re: SQL::Interp doc issue
by ysth (Canon) on Jan 25, 2009 at 18:15 UTC
Re: SQL::Interp doc issue
by jeffa (Bishop) on Jan 23, 2009 at 16:08 UTC

    Hi. I ++'ed this node because, quite frankly, i am sick of how the other monks treat you here, metaperl. It went from -2 to -1. Unbelievable. I think your question is valid and it is very clear that the current group think attitude that clouds this Monastery is being very unfair and just down right rude. Keep up the good fight, brother!

    UPDATE:
    I am glad to see that you node is no longer on the worst of the day. Mine, however, is. That's ok. I have plenty of XP to spare. And plenty of -- votes for the ones who --'ed me as well. What comes around, goes around. This place used to be awesome. And you know what ... i'm gone. All of my friends have left this place. This place is now just a waste of time for me. I wish i could delete my account and take all of the hard work that i gave to this site with me.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    

      I doubt that you will see this, jeffa, if you keep true to your threat. When I read and vote on a node, I am not even looking at the person writing the node until after I vote. I have voted some of metaperl's nodes down, because I thought that they were unnecessarily rude, or contained incorrect or misleading information. I also believe that I have voted some of his nodes up for just the opposite reason (this one included).

      When searching for content on this site, I, for one, prefer accuracy to personality, and vote accordingly. I would hope that my nodes are also vetted the same way.

      There is a story I have heard in the past about a man who ran a local gas station. It happened to be the spot where people coming through the area would stop and ask questions, including the occasional family looking to relocate.

      One day, a couple pulled up the gas station and asked the man how the people in the town were, because they were looking to relocate. The man responded with a question of his own - "How are the people in the town where you are from". The couple responded that the town they came from was full of back stabbing mean spirited people. The man responded that they would probably find more of the same here. The couple moved on.

      A little while later, a second couple came by and started the same conversation. They stated, however, that their town had warm, helpful people that were willing to lend a hand, teach when needed, and could be counted on when in need. Again, the man stated that they would probably find more of the same here.

      My point is twofold.

      • In a population large enough, you will find some set of people that you just don't get along with, and conversely, that fit you like a glove
      • People tend to mirror your expectations and treatment of others.

      Take whichever one fits. Personally, I would miss your contributions.

      --MidLifeXis