mirror of
https://bitbucket.org/jsuto/piler.git
synced 2025-06-13 00:07:03 +02:00
improved multitenancy support
This commit is contained in:
@ -9,6 +9,19 @@ class ModelDomainDomain extends Model {
|
||||
}
|
||||
|
||||
|
||||
public function get_domains_by_string($s = '', $page = 0, $page_len = PAGE_LEN) {
|
||||
$from = (int)$page * (int)$page_len;
|
||||
|
||||
if(strlen($s) < 1) { return array(); }
|
||||
|
||||
$query = $this->db->query("SELECT domain FROM `" . TABLE_DOMAIN . "` WHERE domain LIKE ? ORDER BY domain ASC LIMIT " . (int)$from . ", " . (int)$page_len, array($s . "%") );
|
||||
|
||||
if(isset($query->rows)) { return $query->rows; }
|
||||
|
||||
return array();
|
||||
}
|
||||
|
||||
|
||||
public function deleteDomain($domain = '') {
|
||||
if($domain == "") { return 0; }
|
||||
|
||||
|
Reference in New Issue
Block a user