12345678910111213141516171819202122232425 |
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Model_Staff extends Lin_Model
- {
- function __construct(){
- parent::__construct();
- $this->load->database();
- $this->table = 'staff';
- $this->load_table('staff');
- }
- /** 通过姓名查找查找 */
- public function get_name($name)
- {
- return $this->find("name = '$name'");
- }
- /** 通过电话查找查找 */
- public function get_phone($phone)
- {
- return $this->find("phone = '$phone'");
- }
- /** 通过工号查找查找 */
- public function get_number($number)
- {
- return $this->find("number = '$number'");
- }
- } //end class
|