Just FYI Here's the entire code surrounding it from db connection to disconnect :
my $dbhqq = DBI->connect("DBI:mysql:$db_use:$db_host","$db_user","$db_pass"); $queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'"; print $queryqq; #DBI->trace(1,"trace.txt"); ($tmp = $queryqq) =~ s/([^\x20-\x7E])/'\x' . sprintf "%x20", ord $1/ge;print "DEBUG : NON PRINT ACHAR -$tmp- <br> \n"; my $sthqq = $dbhqq->prepare($queryqq) || print $dbhqq->errstr; print 2; $sthqq->execute or die "Can not execute $queryqq :" . $dbhqq->errstr . "\n"; print 3; my $row; @tmp_row_a = $sthqq->fetchrow_array; foreach $x(@disp_nums_2) { $rel_table_label .= " $tmp_row_a[$x]"; } $sthqq->finish; $dbhqq->disconnect; Again, $dbhqq, $sthqq, $qyeryqq are not used anywhere else in the script. The eval mentioned below only evals a print statement to make sure it's correct and doesn't kill everythign if it is bad And the print statement gets printed just dandy. It does some other stuff it has to do the get s to the code above and dies. Thanks > Howdy group, > > I've also posted this message with the dbi mailing list but > so far nothing from them... > > I have a script that does several queries and I have trouble > with one : > > I can't seem to get a particular query to prepare(). > > $queryqq = "SELECT * FROM $root_table WHERE ID=\'$Root_ID_DB\'"; > Print 1; > print $queryqq; > DBI->trace(2,"trace.txt"); > ($tmp = $queryqq) =~ s/([^\x20-\x7E])/'\x' . sprintf "%x20", > ord $1/ge;print "DEBUG : NON PRINT ACHAR -$tmp- <br> \n"; > # Shows us any unprintable character > my $sthqq = $dbhqq->prepare($queryqq) or die $dbhqq->errstr; > print 2; > > > outputs :: > 1SELECT * FROM root WHERE ID='5'DEBUG : NON PRINT ACHAR > -SELECT * FROM root WHERE ID='5'- No unprintable charcters > > ( I had that happen before, I couldn't see it but to mysql > it was a period which made the query bad ) Never gets to > 'print 2' I can run the generated query > > mysql>SELECT * FROM root WHERE ID='5'; > in the mysql shell and get the right record back > Couldn't make to much sense from trace() > > I can't run this script with -w currently and I have many > other queries that go through fine with the same set up. > Can't seem to see what's happening. The mysql user has all > but grant privileges on this database and table. > > trace.txt :: > > DBI 1.21-nothread dispatch trace level set to 2 > Note: perl is running without the recommended perl -w option > -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x82315ec)~INNER) > <- DESTROY= undef > -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x82317cc)~INNER) > <- DESTROY= undef > -- DBI::END > -> disconnect_all for DBD::mysql::dr > (DBI::dr=HASH(0x80eb5d4)~0x822a8cc) > <- disconnect_all= '' at DBI.pm line 533 > -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x805b360)~INNER) > <- DESTROY= undef during global destruction > -> DESTROY for DBD::mysql::st (DBI::st=HASH(0x82315b0)~INNER) > <- DESTROY= undef during global destruction > -> DESTROY for DBD::mysql::db (DBI::db=HASH(0x822a9bc)~INNER) > imp_dbh->svsock: 8228644 > <- DESTROY= undef during global destruction > -> DESTROY in DBD::_::common for DBD::mysql::dr > (DBI::dr=HASH(0x822a8cc)~INNER) > <- DESTROY= undef during global destruction > DBI 1.21-nothread dispatch trace level set to 1 > Note: perl is running without the recommended perl -w option > <- DESTROY= undef > <- DESTROY= undef > <- disconnect_all= '' at DBI.pm line 533 > <- DESTROY= undef during global destruction > <- DESTROY= undef during global destruction > <- DESTROY= undef during global destruction > <- DESTROY= undef during global destruction > > Any assistance is very appreciated!!Thanks! > > I don't use the $dbhqq and $sthqq or $queryqq anywhere else > in the script! The only other factor is that I can get this > to work ok if I comment > out an eval earlier in the script. > But even with the eval every other query goes through just fine. > > Dan > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]