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

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

报告相同问题?

悬赏问题

  • ¥30 这是哪个作者做的宝宝起名网站
  • ¥60 版本过低apk如何修改可以兼容新的安卓系统
  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!