Hi Mark, > This may be a very simple problem but I just can't see the > solution.
> # prepare and execute query > my $sth = $dbh->prepare("SELECT Time,Person > FROM bookingform > WHERE Date = '$totalYear'"); > $sth->execute(); > > while(my $Person = $sth->fetchrow_array) > { > print "<td class=\"cellDetail\" valign=\"top\" >$Person</td>"; > } Could it be that NULL in the table is mapped to undef on the Perl side? If yes, that's the source of yor troubles. Besides, from the DBI man page: "If called in a scalar context for a statement handle that has more than one column, it is undefined whether the driver will return the value of the first column or the last. So don't do that." What you should do is use while( my($person, $date ) = $sth->fetchrow_array ){ HTH, Thomas -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]