

注意是:mysqli!版本高了,原来的MySQL连接将要过时了,要使用mysqli来连接,而且这个问题只会提示MySQL连接有错误。
查询
常见用法
$data = $User->table('student_info')->select();
$data = $User->table('score_list')->where('stu_id='.$stu_id)->select();
$data = $User->table('student_info')->field(stu_name)->select();
注意:select()是返回二维数组,find()是返回一维数组!用find只会返回一条数据
field:过滤掉别的数据只显示stu_name
在使用时注意连接数据库要在调用一个模块下去调这些方法
网友评论