Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> DBI , perl & oracle8 -> fetchrow & getting 2 many characters.

DBI , perl & oracle8 -> fetchrow & getting 2 many characters.

From: shawn <gs21smw_at_bellsouth.net.nospam>
Date: Sun, 16 May 1999 16:38:12 GMT
Message-ID: <373fef15.56892375@news.atl.bellsouth.net>


Hi =)

Using DBI & linux/oracle

I've run into where I do a fetchrow, put it out to html but it seems like it's pulling the length of the field also so to explain if I have a routine:

    $sql="SELECT QNUM,QUESTION from qmasters";
    $sth = $dbhandle->prepare( "$sql" );
    $sth->execute;

    while ( ($qnum,$question) = $sth->fetchrow ) {     print "<p><strong>$question</strong><br>\n";

        &answers;
    }
    $sth->finish;

sub qanswers pulls the answer to the question asked above;

Now what I'm getting in the html src is the correct information but extra blank characters (like it's pulling all characters according to the field size in the db:

<p><strong>The dog is? </strong><br>
<input type="CHECKBOX" name="q1 " value="A ">Brown
<br>
<input type="CHECKBOX" name="q1 " value="B ">Blue

See? =) ______________________^___________^_______^ & also up above in
the question.

anyone know why this is so? Would appreciate it...

Thanks,
shawn Received on Sun May 16 1999 - 11:38:12 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US