tagCompanyNexus.php 833 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. Doo::loadCore('db/DooModel');
  3. class tagCompanyNexus extends DooModel {
  4. public $tcid;
  5. public $sid;
  6. public $company;
  7. public $tag;
  8. public $_table = 'CLD_tagCompanyNexus';
  9. public $_primarykey = 'tcid';
  10. public $_fields = array('tcid', 'sid','company','tag');
  11. function getTagClientBySCid($cid,$sid){
  12. return $this->getOne(array('where'=>'sid='.$sid.' and company='.$cid, 'asArray' => true));
  13. }
  14. function getTagClientBySid($sid){
  15. return $this->find(array('where'=>'sid='.$sid, 'asArray' => true));
  16. }
  17. function getClientByTag($tag){
  18. $sql = "select * from " . $this->_table . " as a left join CLD_staff as b on (a.sid=b.sid) where a.cid= '".$cid."' " ;
  19. $query = Doo::db ()->query ( $sql );
  20. $result = $query->fetch ();
  21. return $result;
  22. }
  23. }
  24. ?>