>From: shawn wilson [mailto:ag4ve...@gmail.com] 
>Sent: Saturday, February 12, 2011 5:56 PM
>To: beginners@perl.org
>Subject: DBD::mysql::st execute failed
>
>i'm getting this error:
>DBD::mysql::st execute failed: Column count doesn't match value count at
row
>1 at ./test-get.pl line 91, <FILE> line 1.
>DBD::mysql::st execute failed: Column count doesn't match value count at
row
>1 at ./test-get.pl line 91, <FILE> line 1.
>
>and i've been counting placeholders, columns, and variables and everything
>seems to match up. any ideas what i'm missing?
>
>btw, line 91 is the $shipsth->execute( .. ) call. this seems to have 20
>fields.
>
>   lines deleted
>
Shawn,
I did not look too closely at this, but I did notice that you appear to be
missing a comma
On the prepare statement:

>my $shipth = $dbh->prepare('INSERT INTO ship (
>         vid, service, name, tonnage_gt, build, lastrmby,
>         altvin, depth, hullid, flag, endservice, cargoauth,
>         tonnage_grt, length, vin, tonnage_net, callsign,
>         imo, deadweight, breadth
>      ) VALUES( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?   
Appears there should be a comma at the end of previous line

>            ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )'
>   ) or die "QUERY FAIL: $DBI::errstr\n$!\n";
Ken




-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to