Help for this page

Select Code to Download


  1. or download this
    # prepare the SQL
    my $sth = $dbh->prepare('select * from table');
    ...
    while (my @row = $sth->fetch_array()) {
       print join(',', @row), "\n";
    }
    
  2. or download this
    my $res = $dbh->selectall_arrayref('select * from table');
    
    ...
       print "\t</tr>\n";
    }
    print "</table>\n";
    
  3. or download this
    use DBIx::XHTML_Table;
    
    ...
    
    $table->exec_query('select * from table');
    print $table->output();
    
  4. or download this
    print DBIx::XHTML_Table
       ->new('DBI:mysql:database:host', 'user', 'pass')
       ->exec_query('select * from table')
       ->output();