PersonModel.class.php
767 Bytes
<?php
namespace Common\Model;
class PersonModel extends AbstractModel
{
/**
* 构造方法
* @author <362431947@qq.com>
* @date 2018-10-09
*/
public function __construct()
{
parent::__construct();
}
/**
* 更加条件数据获取用户信息
* @author <362431947@qq.com>
* @date 2018-10-09
* @param array $conds 条件数组
* @return array
*/
public function getUserByConds($conds = [],$fields = '*')
{
$params = [];
if (!$this->_parse_where($wheres, $params, $conds)) {
return false;
}
$sql = "SELECT $fields FROM __TABLE__ WHERE `name` = ? AND `pwd` = ? ";
return $this->_m->fetch_row($sql, $params);
}
}