无法使用Codeigniter 4模型获取记录
我正在创建RESTFUL API,我在CodeIgnter 4中创建了我的模型,并且在控制器中尝试获取记录时,它会
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NULL
ORDER BY `id` DESC' at line 3;
像在控制器中一样,
$model = new PlacesModel();
$data['places'] = $model->orderBy('id', 'DESC')->findAll();
return $this->respond($data);
在我没有提及任何零或限制的情况下,这会给我带来此错误呢?
i am creating restful api, i have created my model in codeignter 4 and in controller when i try to fetch record it gives me this error
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'IS NULL
ORDER BY `id` DESC' at line 3;
am fetching like in controller
$model = new PlacesModel();
$data['places'] = $model->orderBy('id', 'DESC')->findAll();
return $this->respond($data);
i did not mentioned any null or limit then why am getting this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论