equal
deleted
inserted
replaced
982 $sqlq.=" AND substring(domains.name,1,1) ".$sql_regexp." '^[[:digit:]]'"; |
982 $sqlq.=" AND substring(domains.name,1,1) ".$sql_regexp." '^[[:digit:]]'"; |
983 } |
983 } |
984 $sqlq.=" GROUP BY domainname, domains.id |
984 $sqlq.=" GROUP BY domainname, domains.id |
985 ORDER BY domainname"; |
985 ORDER BY domainname"; |
986 |
986 |
987 $db->setLimit($rowstart, $rowamount); |
987 $db->setLimit($rowamount, $rowstart); |
988 $result = $db->query($sqlq); |
988 $result = $db->query($sqlq); |
989 // Set limit needs to be called before each query |
989 // Set limit needs to be called before each query |
990 $db->setLimit($rowstart, $rowamount); |
990 $db->setLimit($rowamount, $rowstart); |
991 $result2 = $db->query($sqlq); |
991 $result2 = $db->query($sqlq); |
992 |
992 |
993 $numrows = $result2->numRows(); |
993 $numrows = $result2->numRows(); |
994 $i=1; |
994 $i=1; |
995 if ($numrows > 0) { |
995 if ($numrows > 0) { |
1199 { |
1199 { |
1200 global $db; |
1200 global $db; |
1201 if (is_numeric($id)) |
1201 if (is_numeric($id)) |
1202 { |
1202 { |
1203 if ($_SESSION[$id."_ispartial"] == 1) { |
1203 if ($_SESSION[$id."_ispartial"] == 1) { |
1204 $db->setLimit($rowstart, $rowamount); |
1204 $db->setLimit($rowamount, $rowstart); |
1205 $result = $db->query("SELECT record_owners.record_id as id |
1205 $result = $db->query("SELECT record_owners.record_id as id |
1206 FROM record_owners,domains,records |
1206 FROM record_owners,domains,records |
1207 WHERE record_owners.user_id = ".$db->quote($_SESSION["userid"])." |
1207 WHERE record_owners.user_id = ".$db->quote($_SESSION["userid"])." |
1208 AND record_owners.record_id = records.id |
1208 AND record_owners.record_id = records.id |
1209 AND records.domain_id = ".$db->quote($id)." |
1209 AND records.domain_id = ".$db->quote($id)." |
1226 } |
1226 } |
1227 return $ret; |
1227 return $ret; |
1228 } |
1228 } |
1229 |
1229 |
1230 } else { |
1230 } else { |
1231 $db->setLimit($rowstart, $rowamount); |
1231 $db->setLimit($rowamount, $rowstart); |
1232 $result = $db->query("SELECT id FROM records WHERE domain_id=".$db->quote($id)); |
1232 $result = $db->query("SELECT id FROM records WHERE domain_id=".$db->quote($id)); |
1233 $ret = array(); |
1233 $ret = array(); |
1234 if($result->numRows() == 0) |
1234 if($result->numRows() == 0) |
1235 { |
1235 { |
1236 return -1; |
1236 return -1; |