sub print_response { unless ($query->param) { print "No data has been submitted"; return; } $sql = "SELECT col1, col2 FROM test ORDER BY col2 desc;"; $sth=$dbh->prepare($sql) or die $dbh->errstr; $sth->execute; print "
col1 | "; print "col2 | "; print "
---|---|
$the_st | $the_mc |