1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- Doo::loadCore('db/DooModel');
- class tag_client extends DooModel {
- public $tcid;
- public $sid;
- public $client;
- public $tag;
-
- public $_table = 'CLD_tag_client';
- public $_primarykey = 'tcid';
- public $_fields = array('tcid', 'sid','client','tag');
- function getTagClientBySCid($cid,$sid){
- return $this->getOne(array('where'=>'sid='.$sid.' and client='.$cid, 'asArray' => true));
- }
-
- function getTagClientBySid($sid){
- return $this->find(array('where'=>'sid='.$sid, 'asArray' => true));
- }
-
- function getClientByTag($tag){
- $sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid) where a.cid= '".$cid."' " ;
-
- $query = Doo::db ()->query ( $sql );
-
- $result = $query->fetch ();
-
- return $result;
- }
- }
- ?>
|