12345678910111213141516171819202122232425 |
- <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
- class Model_user extends Lin_Model
- {
- function __construct(){
- parent::__construct();
- $this->load->database();
- $this->table = 'user';
- $this->load_table('user');
- }
- /** 通过userid查找 */
- public function get_uid($userid,$own)
- {
- return $this->find("userid = '$userid' and own = '$own'");
- }
- /** 通过API查找 */
- public function get_api($api)
- {
- return $this->find("api = '$api'");
- }
- /** 更新登陆信息 */
- public function get_land($data)
- {
- $this->save(array('newtime'=>time(),'oldtime'=>$data['newtime']),$data['id']);
- }
- } //end class
|