bwern has asked for the wisdom of the Perl Monks concerning the following question:
I am selecting several fields from a vanilla mysql database, however one row's result is being truncated. In particular, the 'torun' column contains <\ - this and anything following is truncated. For example, a database entry for torun contains:
but the perl select:touch /var/opt/OV/dbspi/defaults; /var/opt/OV/bin/instrumentation/dbsp +icfg -i </var/opt/OV/bin/instrumentation/disney-dbtab; /var/opt/OV/bi +n/instrumentation/dbspi_mw_int;
returns only touch /var/opt/OV/dbspi/defaults; /var/opt/OV/bin/instrumentation/dbspicfg -i$lookup = $dbh->prepare_cached("select file,whereto,filename,torun fro +m esm.ConfigMgr_FileRef"); $lookup->execute(); while ( ($Tfile,$Twhereto,$Tfilename,$Ttorun) = $lookup->fetchrow_arra +y) { print "$Twhereto\n"; print "$Tfilename\n"; print "$Ttorun\n"; }
I validated that removing the < character allows the remaining text to be selected properly, but this is an important part of the data, which is used later in the program.
Despite searching perlmonks, nutshell books, and hitting my head against the keyboard, I have been unable to determine a fix. If any monk sees fit to share their knowledge, I would be eternally grateful.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: DBI mysql select truncating on special character
by graff (Chancellor) on Apr 18, 2006 at 22:59 UTC | |
by bwern (Initiate) on May 10, 2006 at 03:13 UTC |