Hello all, Hope this is easy to replicate. After connect, my code: my $sth = $dbh->prepare( "select fname, lname, addr, city, state from person"); # my $sth = $dbh->prepare( "select fname, lname from person"); $sth->execute; $sth->bind_columns( \$f, \$l, \$a, \$c, \$s ); # $sth->bind_columns( \$f, \$l ); while ($sth->fetchrow) { foreach ( $f, $l, $a, $c, $s ) { # foreach ( $f, $l ) { printf"%-20s", $_; } print"\n"; } $sth->finish; $dbh->disconnect;
The person table has 7 records, 3 of which have values in all fields, 4 have only fname and lname. As shown 3 rows are displayed (those with values in each field) To display all fname and lname entries I use the (commented out) bind_columns and foreach. I don't understand this behavior. If one or more columns is null none of the bound variables are populated!? Could this be what is happening in Roderick's case? David