http://qs321.pair.com?node_id=918152


in reply to column count error followed by too few bind variables

You need to debug your code. E.g., what do you think this is doing:
join("\t",@h),"\n";
Why is this line there:
my $j = 1+ $i;
Did you know you can more simply iterate over elements of an array with, e.g.:
for my $element (@h)
use print and/or warn to output messages until your satisfied that all of your variables are what you expect them to be. E.g. I don't know what this does because you didn't provide the source for it, and I'm sure I don't want to see it:
my @quotes = getquote(@symbols);

Replies are listed 'Best First'.
Re^2: column count error followed by too few bind variables
by AnomalousMonk (Archbishop) on Aug 02, 2011 at 23:52 UTC

    Further to runrig's reply: The presence of the statement
        join("\t",@h),"\n";
    suggests baperl is not running with strictures (use strict;) or warnings (use warnings;) enabled, which might offer many suggestions about other problems in the code:

    >perl -wMstrict -le "my @h = qw(a bc def ghij); join(qq{\t}, @h), qq{\n}; " Useless use of join or string in void context at -e line 1. Useless use of a constant ( ) in void context at -e line 1.

    Update: Removed extraneous statement from example code.

Re^2: column count error followed by too few bind variables
by baperl (Sexton) on Aug 03, 2011 at 01:07 UTC
    thanks runrig, I've been staring at this code and testing and trying so many different iterations that I accidentally left the
    my $j=...
    I will fix the join, and these are the methods I am using
    #!/usr/bin/perl -w use strict; use Finance::YahooQuote; use DBI; use DBD::mysql; use DBIx::Simple; use SQL::Abstract;
    I suspect that is what you were refering to when you said the source for my @quotes.