Fatal error: Class 'think\db' not found
在model层写了一个查询语句结果报错 Fatal error: Class 'think\db' not found
$list= Db::table('m_my_reserve_assess')
->alias('mra')
->field('mra.id,mra.insert_time,mra.update_time,mra.status,ma.realname,c.company_name,u.name,u.mobile')
->join('m_user u','mra.uid = u.id')
->join('m_my_reserve mr','mra.mr_id = mr.id')
->join('m_company c','mr.r_cid = c.id')
->join('m_admin ma','mra.aid = ma.id')
->where($where)
->order(['mra.insert_time'=>'desc', 'mra.update_time' => 'desc'])
->select();
刚开始以为是
Class 'think\db'没有引用,然后实际情况是有引用的。 解决办法 在前面实例化这个model就行
$MyReserveAssess = new MyReserveAssess();
// $list=$MyReserveAssess
$list= Db::table('m_my_reserve_assess')
->alias('mra')
->field('mra.id,mra.insert_time,mra.update_time,mra.status,ma.realname,c.company_name,u.name,u.mobile')
->join('m_user u','mra.uid = u.id')
->join('m_my_reserve mr','mra.mr_id = mr.id')
->join('m_company c','mr.r_cid = c.id')
->join('m_admin ma','mra.aid = ma.id')
->where($where)
->order(['mra.insert_time'=>'desc', 'mra.update_time' => 'desc'])
->select();
Fatal error: Class 'think\db' not found的更多相关文章
- redis启动报错:Fatal error loading the DB: Invalid argument
redis启动报错 add it to your /etc/rc.local in order to retain the setting after a reboot. Redis must be ...
- Redis报错 Server started, Redis version 3.2.13 Can't handle RDB format version 9 Fatal error loading the DB: Invalid argument. Exiting.
在/usr/local/etc 目录下 运行 redis-server 命令重启 redis 服务发现报错,报错信息如下: 如上报错的含义是:当前的redis的版本是3.2.13版本,无法处理 ver ...
- VS2017 Git failed with a fatal error. error: open(".vs/xxxxxx/v15/Server/sqlite3/db.lock"): Permission denied fatal: Unable to process path .vs/xxxxxx/v15/Server/sqlite3/db.lock
具体错误信息:Git failed with a fatal error. error: open(".vs/xxxxxx/v15/Server/sqlite3/db.lock") ...
- mysqli,Fatal error
<?php //mysql数据库类-mysqli版 //2014/6/13 class mysqlidb{ public $dbhost; public $dbuser; public $dbp ...
- CentOS yum Fatal Error 处理一例
环境说明 [root@thatsit ~]# cat /etc/redhat-release CentOS Linux release (Core) [root@thatsit ~]# uname - ...
- 【nodejs】FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
当使用大批量(>100)的SQL进行MySql数据库插值任务时,会发生以下错误: 总计将有371579条数据将被插入数据库 开始插入DB <--- Last few GCs ---> ...
- 解决PHP Fatal error mysql_connect() mysql_query()的问题
单独安装Apache.PHP.Mysql在进行开发调试的时候经常会遇到各种问题,好多人说比appserv或者xampp集成安装包麻烦,其实不然,单独配置可以更深入的了解每个部件分别是怎么运行的,深入理 ...
- PHP Fatal error: Undefined class constant 'MYSQL_ATTR_INIT_COMMAND'
最近用ThinkPHP,给公司布置线上的网站的时候,遇到的一个问题,记录一下. 打开IE浏览器的设置,Internet选项里的高级,将”显示友好的HTTP错误消息“前都勾去掉! 再次刷新,看到的错误是 ...
- Centos 7.5源码编译安装zabbix4.0报fatal error: mysql.h: No such file or directory
系统环境:CentOS 7.5是最小化安装的 编译信息 编译选项: root@Server01 zabbix-]# ./configure --prefix=/usr/share/applicatio ...
随机推荐
- DNS服务器搭建笔记
DNS在linux服务器上的服务名是named,而named服务依赖软件bind. 环境: 系统版本:VBOX虚拟机centos6.0. 本机内网IP 192.168.2.198. ...
- 深入理解java虚拟机(3)垃圾收集器与内存分配策略
一.根搜索算法: (1)定义:通过一系列名为"GC Roots"的对象作为起点,从这些起点开始向下搜索,搜索走过的路径称为引用链,当一个对象到GC Roots没有任何引用链相连的时 ...
- 问题:Thymeleaf整合Spring Security后sec属性不起作用
可能原因: 版本不兼容,例如2.1.x的SpringBoot不兼容3.0.4的thymeleaf-extras-springsecurity4 解决方案: 修改Spring Boot的版本为2.0.x ...
- 微信小程序自定义字体及自定义图标问题说明
自定义图标及自定义字体,一直是很多小程序开发者的心病,其实本站是很多解决方案的,为了集中起来,方便直接跳过此坑,我特别做了这次针对字体及字体图标的跳坑: 相关文章:微信小程序添加并使用外部字体(成功添 ...
- js node 节点 原生遍历 createNodeIterator
1.createIterator msn: https://developer.mozilla.org/en-US/docs/Web/API/Document/createNodeIterator v ...
- Vim搜索关键字
有以下两种方法 Method 1:/content 默认从上往下查找 只读模式下输入 /content 后回车 按 n 向下查找 按N 向上查找 Method 2:?content 默认从下往上查找 ...
- mysql远程不能连接问题
解决Navicat无法连接到腾讯云MySQL的问题 工具/原料 Navicat phpstudy 腾讯云 Xshell6 方法/步骤 1 1.首先远程连接进入服务器,在cmd中输入mysql ...
- string::front
char& front(); const char& front() const;功能:返回string对象的首个字符,可以改变它的值 #include <string># ...
- Kendo UI使用教程:Bower Packages
[Kendo UI最新试用版下载] Kendo UI目前最新提供Kendo UI for jQuery.Kendo UI for Angular.Kendo UI Support for React和 ...
- 【leetcode】Reach a Number
题目: You are standing at position 0 on an infinite number line. There is a goal at position target. O ...