Changeset 152
- Timestamp:
- 10/21/11 17:59:01 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r135 r152 1457 1457 my $result = $dbh->selectrow_hashref("SELECT $par_col{$type} FROM $par_tbl{$type} WHERE $id_col{$type} = ?", 1458 1458 undef, ($id) ); 1459 unshift @parlist, ($result->{$par_col{$type}} => $par_type{$type}); 1459 my %tmp = ($result->{$par_col{$type}} => $par_type{$type}); 1460 unshift @parlist, \%tmp; 1460 1461 last if $result->{$par_col{$type}} == 1; # group 1 is its own parent 1462 $id = $result->{$par_col{$type}}; 1461 1463 $type = $par_type{$type}; 1462 $id = $result->{$par_col{$type}};1463 1464 } 1464 1465 … … 1502 1503 # group 1 is its own parent. need this here more to break strange loops than for detecting a parent 1503 1504 last if $result->{$par_col{$type}} == 1; 1505 $id = $result->{$par_col{$type}}; 1504 1506 $type = $par_type{$type}; 1505 $id = $result->{$par_col{$type}};1506 1507 last if $tmp++ > 10; 1507 1508 }
Note:
See TracChangeset
for help on using the changeset viewer.