in reply to PerlApp and Class::DBI don't mix! or do they?
Are you using a threaded Perl? Are you sure you have the MySQL table set up properly? Do you have the proper DBD::mysql installed? What version of MySQL are you running? Imho, it seems very odd that you would run into this problem only when actually doing database work.
I would try the following as a test:
#!/usr/bin/perl use strict; use warnings; use DBI; my $dbh = DBI->connect( 'Main', 'dbi:mysql:incontact', 'root', '', { R +aiseError => 1 } ) or die $DBI::errstr; print "Have DBH!\n"; my $sth = $dbh->prepare( 'SELECT 1' ); $sth->execute; my @x = $sth->fetchrow_array; print "@x\n"; $dbh->disconnect; print "Done\n";
If, as I suspect, that script fails, the problem is not with Class::DBI or threading or anything fancy - it has to do with your database and how you're connecting to it. If that script succeeds, then you do have a zebra.
Remember - most interns in teaching hospitals think that every cough is a sign of Ebola when, 99.999999% of the time, it's just a cough.
Being right, does not endow the right to be rude; politeness costs nothing.
Being unknowing, is not the same as being stupid.
Expressing a contrary opinion, whether to the individual or the group, is more often a sign of deeper thought than of cantankerous belligerence.
Do not mistake your goals as the only goals; your opinion as the only opinion; your confidence as correctness. Saying you know better is not the same as explaining you know better.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: PerlApp and Class::DBI don't mix! or do they?
by jdtoronto (Prior) on Oct 06, 2004 at 15:14 UTC |