WIP Voicenumber Billing 2024-07-05
This commit is contained in:
@@ -52,8 +52,16 @@ class VoiceplandestinationModel {
|
||||
$db = FronkDB::singleton();
|
||||
|
||||
$where = self::getSqlFilter($filter);
|
||||
mfLoghandler::singleton()->debug($where);
|
||||
$res = $db->select("Voiceplandestination", "*", "$where ORDER BY destination,prefix");
|
||||
|
||||
$sql = "SELECT * FROM Voiceplandestination WHERE $where ORDER BY destination,prefix";
|
||||
$sql = "SELECT Voiceplandestination.* FROM Voiceplandestination
|
||||
LEFT JOIN Voiceplanzone ON (Voiceplanzone.id = Voiceplandestination.voiceplanzone_id)
|
||||
WHERE $where
|
||||
ORDER BY destination,prefix LIMIT 1
|
||||
";
|
||||
mfLoghandler::singleton()->debug($sql);
|
||||
$res = $db->query($sql);
|
||||
//$res = $db->select("Voiceplandestination", "*", "$where ORDER BY destination,prefix");
|
||||
if($db->num_rows($res)) {
|
||||
$data = $db->fetch_object($res);
|
||||
$item = new Voiceplandestination($data);
|
||||
@@ -99,7 +107,7 @@ class VoiceplandestinationModel {
|
||||
if(is_array($limit) && count($limit)) {
|
||||
if(is_numeric($limit['start']) && is_numeric($limit['count'])) {
|
||||
$sql .= " LIMIT ".$limit['start'].", ".$limit['count'];
|
||||
} elseif(is_numeric($count)) {
|
||||
} elseif(is_numeric($limit['count'])) {
|
||||
$sql .= " LIMIT ".$limit['count'];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user