| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- Doo::loadCore('db/DooModel');
- class Hosts extends DooModel {
- public $id;
- public $serverid;
- public $hostname;
- public $domain;
- public $sales;
- public $status;
- public $webver;
- public $softver;
- public $created_at;
- public $updated_at;
- public $_table = 'sfu_hosts';
- public $_primarykey = 'id';
- public $_fields = array('id', 'serverid', 'hostname', 'domain', 'sales', 'status', 'webver', 'softver', 'created_at', 'updated_at');
- public function __construct() {
- parent::setupModel(__CLASS__);
- }
- public function getServerHosts($sql,$limit){
- return $this->find(array('where' => $sql, 'desc' => 'id', 'limit' => $limit, 'asArray' => TRUE));
- }
- public function getRowbyID($id){
- return $this->getOne(array('where' => 'id='.$id, 'asArray' => TRUE));
- }
- }
|