andrew has asked for the wisdom of the Perl Monks concerning the following question:
How else could I do this$sth = $dbh->prepare("SELECT id,name FROM category WHERE parent IS NU +LL"); $sth->execute or die $dbh->errstr; while ( @slog = $sth->fetchrow_array ) { $sth = $dbh->prepare("SELECT id,name FROM category WHERE parent = +'$slog[0]'"); $sth->execute or die $dbh->errstr; $rv = $sth->rows; $subs = $rv; print qq~ <tr> <td bgcolor="#CCCCCC" class="darktext" width="200"> $slog[1] </td> <td bgcolor="#CCCCCC" class="darktext" width="50"> $subs </td> <td bgcolor="#CCCCCC" class="darktext" width="50"> 506 </td> <td align="center" bgcolor="#CCCCCC" class="darktext" width="7 +0"> settings </td> </tr> ~; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Using Multiple Statements MySQL
by gryphon (Abbot) on Jul 19, 2002 at 20:05 UTC | |
Re: Using Multiple Statements MySQL
by Nightblade (Beadle) on Jul 19, 2002 at 19:40 UTC | |
Re: Using Multiple Statements MySQL
by gav^ (Curate) on Jul 19, 2002 at 21:07 UTC |