DBD-mysqlPP - Can't get execute to execute.....

Posted on Thu Feb 14 18:08:32 2008 by dougmcq
Can't get execute to execute.....
Must be missing something obvious here...
Refreshed local perl environment with 5.10.0 then installed mysqlPP via ppm. Installation verfified by use of @ary = DBI->installed_drivers; Confirmed login & SQL syntax via MySQL Query Browser 1.2.12 Now attempting remote connect from WIn XP Pro v5.1 (same PC) to MySQL 5.0.24 (same DB). Script runs as expected [including confirmation via @dbs = $dbh->func('_ListDBs');] Then it 'hangs' on $sth -> execute; When script is in this state, the thread (determined by MySQL Query Administrator 1.2.12) has COMM +AND=sleep status.
Suggestions would be greatly appreciated :-) Thanks, Doug
#!/usr/bin/perl use strict; use DBI; my $dbh = DBI->connect("dbi:mysqlPP:host=IP:3306;database=DB", "USER", "PASSWORD",{'RaiseError' => +1}); my @dbs = $dbh->func('_ListDBs'); print "@dbs\n"; my $sql = q{ select file_id from file where file_id < 100; }; my $sth = $dbh->prepare($sql); print "Prepare Complete\n"; $sth->execute; print "Execute Complete\n"; while (my @results = $sth->fetchrow_array()) { print "$results[0]\n"; } $sth->finish; $dbh->disconnect;
Write a response