<?php
namespace app\index\controller;
use think\Controller;
use think\Db;
class Index extends Controller
{
public function index()
{
$res = Db::query('select * from users where id=?',[1]);
//$res = Db::table('users')->select();
dump($res);
}
}1、用Db::query正常,如下图

2、使用select()或者find()就报500,如下图,求大神解答

我的的运行没有问题,我的版本是5.1.9


查看一下你的TP的版本
我把你的代码试了一下,没有任何问题,应该不是这个页面的问题,问题应该出在别的地方