department.php 421 B

123456789101112131415161718192021
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. class department extends DooModel {
  4. public $did;
  5. public $cid;
  6. public $departmentName;
  7. public $_table = 'CLD_department';
  8. public $_primarykey = 'did';
  9. public $_fields = array (
  10. 'cid',
  11. 'departmentName',
  12. 'did'
  13. );
  14. public function getDepartmentBycid($cid = 0) {
  15. return $this->find ( array (
  16. 'where' => "cid= '" . $cid . "' ",
  17. 'asArray' => TRUE
  18. ) );
  19. }
  20. }
  21. ?>