Changeset 826
- Timestamp:
- 03/06/21 09:17:26 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/DNSDB.pm
r823 r826 2728 2728 } 2729 2729 2730 my ($domid) = $dbh->selectrow_array( 2731 "SELECT domain_id FROM domains WHERE lower(domain) = lower(?) AND default_location = ?", 2732 undef, ($domain, $location) ); 2730 my $sql = "SELECT domain_id FROM domains WHERE lower(domain) = lower(?)"; 2731 my @zargs = ($domain); 2732 # yay magic strings! 2733 if ($location eq ':ANY:') { 2734 # no-op 2735 } else { 2736 $sql .= " AND default_location = ?"; 2737 push @zargs, $location; 2738 } 2739 2740 my ($domid) = $dbh->selectrow_array($sql, undef, @zargs); 2741 2733 2742 if (!$domid) { 2734 2743 if ($dbh->err) { … … 2759 2768 } 2760 2769 2761 my ($revid) = $dbh->selectrow_array( 2762 "SELECT rdns_id FROM revzones WHERE revnet = ? AND default_location = ?", 2763 undef, ($revzone, $location) ); 2770 my $sql = "SELECT rdns_id FROM revzones WHERE revnet = ?"; 2771 my @zargs = ($revzone); 2772 # yay magic strings! 2773 if ($location eq ':ANY:') { 2774 # no-op 2775 } else { 2776 $sql .= " AND default_location = ?"; 2777 push @zargs, $location; 2778 } 2779 2780 my ($revid) = $dbh->selectrow_array($sql, undef, @zargs); 2781 2764 2782 if (!$revid) { 2765 2783 if ($dbh->err) {
Note:
See TracChangeset
for help on using the changeset viewer.