Changeset 96
- Timestamp:
- 12/01/04 15:53:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r95 r96 34 34 our %disp_alloctypes; 35 35 our %list_alloctypes; 36 our @citylist; 37 our @poplist; 36 38 37 39 # Let's initialize the globals. … … 42 44 my $sth; 43 45 46 # Initialize alloctypes list 44 47 $sth = $dbh->prepare("select type,dispname from alloctypes"); 45 48 $sth->execute; 46 49 return (undef,$sth->errstr) if $sth->err; 47 48 50 while (my @data = $sth->fetchrow_array) { 49 51 $disp_alloctypes{$data[0]} = $data[1]; 50 52 } 53 54 # City and POP listings 55 $sth = $dbh->prepare("select * from cities"); 56 $sth->execute; 57 return (undef,$sth->errstr) if $sth->err; 58 my $i = 0; 59 my $j = 0; 60 while (my @data = $sth->fetchrow_array) { 61 $citylist[$i++] = $data[0]; 62 if ($data[1] eq 'y') { 63 $poplist[$j++] = $data[0]; 64 } 65 } 66 51 67 return (1,"OK"); 52 68 } # end initIPDBGlobals
Note:
See TracChangeset
for help on using the changeset viewer.