Can you please let me know where my error is. thanks!sub print_response { unless ($query->param) { print "<b>No data has been submitted</b>"; return; } $sql = "SELECT col1, col2 FROM test ORDER BY col2 desc;"; $sth=$dbh->prepare($sql) or die $dbh->errstr; $sth->execute; print "</td><td>"; print "<table border>"; print "<tr>"; print "<th>col1</th>"; print "<th>col2</th>"; print "</tr>"; while (my $hash_ref = $sth->fetchrow_hashref) { $the_st = $hash_ref->{'col1'}; $the_mc = $hash_ref->{'col2'}; print "<tr><td>$the_st</td><td align=\"right\">$the_mc</td></tr> +"; } print "</table></td></tr></table>"; $sth->finish; }
In reply to post data from db on website by baperl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |