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