simple fix:

while( ($col1) = $sth_1->fetchrow_array){

because $sth_1->fetchrow_array returns an array, $col1 needs to be part
of a list context.


On Wed, 2002-10-16 at 13:10, Liu, Jenny wrote:
> 
> 
> The following simple sql statement just try to select a column from a table.
> But if the value is 0 or null, the row will not be printed.  Is there any
> way I can make all the rows printed?  The col1 is a integer data type in
> table.
> Thanks
> 
> 
>         $Sql_stmt = "select col1 from jenny      ";
>         my $sth_1 = $dbh->prepare($Sql_stmt);
>         $sth_1->execute;
>         while( $col1 = $sth_1->fetchrow_array){
>                 print qq($col1 ** \n);
>         }


Reply via email to