gpt4 book ai didi

php - MYSQL 错误 1096 - 未使用表 - CODEIGNITER

转载 作者:搜寻专家 更新时间:2023-10-30 21:40:54 24 4
gpt4 key购买 nike

我正在使用自定义查询,因为 Active Record 等价物对我不起作用。

当在我的数据库软件 SQLYOG 中放置查询时它工作正常但是在 CodeIgniter 中它说

A Database Error Occurred

Error Number: 1096

No tables used

SELECT *

Filename: C:\xampp\htdocs\midas\system\database\DB_driver.php

Line Number: 330

这是我的查询:

SELECT intervention.department_id, department_name, COUNT(*)
FROM intervention
LEFT JOIN department ON department.department_id = intervention.department_id

GROUP BY intervention.department_id, department.department_name
ORDER BY COUNT(*) desc
LIMIT 1

这是一个有点奇怪的问题。

这也是我的架构:

http://i.imgur.com/mKNtc.png

最佳答案

没关系,我想通了。

对于 Codeigniter 中的自定义查询,您不能在之后使用 get 方法。

关于php - MYSQL 错误 1096 - 未使用表 - CODEIGNITER,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6927940/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com