Hello,

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 a 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 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!

Dan

Reply via email to