doupu1957 2018-12-04 23: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-05 01: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

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

报告相同问题?