in reply to Sub routine processing issue, HELP!!!!!
There's a whole bunch of problems here. Apart from those already mentioned, do you really mean to put each result into a seperate table with no </table> tag?
..... ## Rather then getting '$all_info' with one fetch, then getting a N_NU +M with a seperate fetch, do it all at once. ## (assuming you are using two tables). Now you can skip the sub all t +ogether. my $tablerows = ""; ## Build the table row data, then add it to print +.... my $sth = $dhb->prepare("SELECT a.product, b.number FROM tableA a, tab +leB b WHERE a.id = b.id"); ## or whatever $sth->execute(); $sth->bind_columns(\my($product,$number)); ## use bind_columns while ($sth->fetch()) { my $found = ($number) ? 'FOUND' : 'NOT FOUND'; $tablerows .= qq{<tr><td width="15"> </td><td class="textgrey +b">$product</td><td class="textgreyb">$found</td></tr>\n}; } ## Using here-is print <<HTML; <table width="100%" border="0" cellspacing="0" cellpadding="0"> $tablerows </table> HTML ....
You might want to read up on HTML::Template, as suggested earlier, for another way to output out the HTML
|
|---|