in reply to Re: HTML::Table multi-row head
in thread HTML::Table multi-row head

I think that $sth->{NAME} is already an array reference.

If you want multiple heading rows I think the OP will need to add them after the new() call:

$table->addRow(@second_header); $table->setRowHead(-1);

Replies are listed 'Best First'.
Re^3: HTML::Table multi-row head
by avik (Novice) on Jan 07, 2005 at 00:40 UTC
    It does not work, however... Since I lack good imagination I tested that code by doing this:
    $table->addRow($sth->{NAME});
    $table->addRow($sth->{NAME});
    $table->setRowHead(-1);
    
    But my script suddenly failed to load. In the background two instances of perl.exe are running and the browser fails to load the table anymore.

      You could try the following:

      $table->addRow( @{$sth->{NAME}} ); $table->setRowHead(1); $table->addRow( @{$sth->{NAME}} ); $table->setRowHead(2);

      However, I'm not sure what the exact problem is here. Please try checking your server error log to see if any useful messages are being generated.

Re^3: HTML::Table multi-row head
by davis (Vicar) on Jan 06, 2005 at 17:23 UTC

    In a word, d'oh. You may ignore my demented ramblings.


    davis
    It wasn't easy to juggle a pregnant wife and a troubled child, but somehow I managed to fit in eight hours of TV a day.