my $sth = $dbh->prepare( "select ..." ); # sql with "?" in there somewhere $sth->execute( $param ); # pass a value from cgi params my $rows = $sth->fetchall_arrayref; if ( ref( $rows ) eq 'ARRAY' and @$rows ) { print "
| User | System |
|---|---|
| " . join( " | ", @$row ) . " |
No matches found.
"; }