[英]Laravel 5.8 SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax;
SQLSTATE[42000]:语法错误或访问冲突:1064 你的 SQL 语法有错误; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from
contacts
order bycreated_at
desc limit 10 offset 0' at line 1 (SQL: select fromcontacts
order bycreated_at
desc limit 10 offset 0)检查与您的 MariaDB 服务器版本相对应的手册,以获取在第 1 行的“从
contacts
顺序 bycreated_at
desc limit 10 offset 0”附近使用的正确语法(SQL:从contacts
顺序中选择created_at
desc limit 10 offset 0)
根据错误消息,我猜您需要更新查询
select * from contacts order by created_at desc limit 10 offset 0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.