Changeset 261 for trunk/cgi-bin/main.cgi
- Timestamp:
- 06/17/05 16:08:35 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r256 r261 50 50 51 51 52 #prototypes53 # Needs rewrite/rename54 sub countRows($); # returns first element of first row of passed SQL55 # Only usage passes "select count(*) ..."56 57 52 # Global variables 58 my $RESULTS_PER_PAGE = 50;59 53 my %webvar = parse_post(); 60 54 cleanInput(\%webvar); … … 220 214 print "</tr>\n"; 221 215 } # startTable 222 223 224 # Return first element of passed SQL query225 sub countRows($) {226 my $sth = $ip_dbh->prepare($_[0]);227 $sth->execute();228 my @a = $sth->fetchrow_array();229 $sth->finish();230 return $a[0];231 }232 216 233 217
Note:
See TracChangeset
for help on using the changeset viewer.