Changeset 155 for trunk/DNSDB.pm
- Timestamp:
- 10/26/11 18:10:09 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r152 r155 1488 1488 return 1 if $type1 eq 'group' && $id1 == 1; 1489 1489 1490 # groups are always (a) parent of themselves 1491 return 1 if $type1 eq 'group' && $type2 eq 'group' && $id1 == $id2; 1492 1490 1493 # almost the same loop as getParents() above 1491 1494 my $id = $id2; 1492 1495 my $type = $type2; 1493 1496 my $foundparent = 0; 1494 my $tmp = 0; 1497 1495 1498 while (1) { 1496 my $sql = "SELECT $par_col{$type} FROM $par_tbl{$type} WHERE $id_col{$type} = ?";1499 my $sql = "SELECT $par_col{$type} FROM $par_tbl{$type} WHERE $id_col{$type} = ?"; 1497 1500 my $result = $dbh->selectrow_hashref($sql, 1498 1501 undef, ($id) ) or warn $dbh->errstr." $sql"; … … 1505 1508 $id = $result->{$par_col{$type}}; 1506 1509 $type = $par_type{$type}; 1507 last if $tmp++ > 10;1508 1510 } 1509 1511
Note:
See TracChangeset
for help on using the changeset viewer.