doupu1957 2018-12-04 15:15
浏览 109
已采纳

语法错误的Laravel SQL查询异常

I set up marketplacekit using the installation instruction at https://github.com/marketplacekit/marketplacekit, which is based on Laravel framework. On accessing the index.php, I encountered the error below:

Illuminate \ Database \ QueryException (42000)` SQLSTATE[42000]: Syntax error or access violation: 1064 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 '>'$."price"') as aggregate from 'listings' where 'listings'.'deleted_at' is null" at line 1 (SQL: select min('meta'->'$."price"') as aggregate from 'listings' where 'listings'.'deleted_at' is null)

Please help with a resolution for this. Thanks. My PHP version is 7.2.7; Mysql: 15.1; MariaDB: 10.3.10; Apache server 2.4.33

  • 写回答

1条回答 默认 最新

  • doutizong8099 2018-12-04 17:43
    关注

    It looks like this is a known issue. Apparently Laravel doesn't support JSON where clauses in MariaDB:

    https://github.com/marketplacekit/marketplacekit/issues/20

    They mentioned this package to add MariaDB support, but had not tested it:

    https://github.com/ybr-nx/laravel-mariadb

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部