单数据查询
数据集查询
其它查询
<?php
namespace app\controller;
use think\facade\Db;
use app\model\Admin;
use think\model;
class Datec {
public function index(){
$user = Db::table("jk_admin")->select();
// return $user;
return json($user);
}
public function gadmin(){
$ainfo = Admin::select();
return json($ainfo);
}
public function ssql(){
$asql = Db::table("jk_admin")->select();
$asql = Db::connect("mysql")->table("jk_admin")->select();
$asql = Db::table("jk_admin")->where("id",27)->find();
$asql = Db::getLastSql();
return $asql;
}
}