1234567891011121314151617181920212223242526272829303132 |
- <?php
- namespace app\model;
- class User extends MySqlite
- {
- protected $tablename = 'sys_user';
- protected $pk = 'id';
- protected $schema = [
- "id" => "INTEGER",
- "username" => "TEXT",
- "password" => "TEXT",
- "create_time" => "INTEGER",
- ];
- public function __construct()
- {
- parent::__construct();
- }
- public function getInfoByUsername($username)
- {
- $sql = "select * from " . $this->tablename . " where username='" . $username . "' limit 1";
- $data = $this->getOne($sql);
- return $data;
- }
- }
|