[Domain] fixed import + filtering on domain column
This commit is contained in:
@@ -38,13 +38,13 @@ class DomainModel {
|
||||
"INSERT INTO `Domain` (`inwxRoId`, `domain`, `period`, `crDate`, `exDate`, `reDate`, `upDate`, `transferLock`, `status`, `authCode`, `registrant`, `admin`, `tech`, `billing`, `ns`, `pleskId`, `pleskHostingType`, `pleskCreated`) VALUES ";
|
||||
$values = [];
|
||||
foreach ($domains as $domain) {
|
||||
$valueStr ="(" .
|
||||
$valueStr = "(" .
|
||||
$domain['roId'] . ", '" .
|
||||
$domain['domain'] . "', '" .
|
||||
$domain['period'] . "', " .
|
||||
$domain['crDate']['timestamp'] . ", " .
|
||||
$domain['exDate']['timestamp'] . ", " .
|
||||
$domain['reDate']['timestamp'] . ", " .
|
||||
(isset($domain['reDate']) ? $domain['reDate']['timestamp'] : "NULL") . ", " .
|
||||
(isset($domain['reDate']) ? $domain['reDate']['timestamp'] : "NULL") . ", " .
|
||||
$domain['upDate']['timestamp'] . ", " .
|
||||
($domain['transferLock'] ? 1 : 0) . ", '" .
|
||||
$domain['status'] . "', '" .
|
||||
@@ -93,7 +93,7 @@ class DomainModel {
|
||||
}
|
||||
|
||||
public static function getSqlFilter($filters): string {
|
||||
$sql = isset($filters['crDate']) ? self::generateFilterCondition($filters['domain'], "domain") : "";
|
||||
$sql = isset($filters['domain']) ? self::generateFilterCondition($filters['domain'], "domain") : "";
|
||||
$sql .= isset($filters['crDate']) ? " AND `crDate` = " . $filters['crDate'] : "";
|
||||
$sql .= isset($filters['exDate']) ? " AND `exDate` = " . $filters['exDate'] : "";
|
||||
$sql .= isset($filters['reDate']) ? " AND `reDate` = " . $filters['reDate'] : "";
|
||||
|
||||
Reference in New Issue
Block a user