MySQL Error Code: 1305. FUNCTION JSON_EXTRACT does not exist in MySQL client version: 5.5.52

后端 未结 1 1763
栀梦
栀梦 2020-12-19 04:20

Goal :- json_extract does not exist error.

I do have message body like this.

  < message type = "ch         


        
相关标签:
1条回答
  • 2020-12-19 04:44

    The version of mysql client is not relevant. The functionality exists (or in your case does not exist) in the mysql server. Thus the only thing that's relevant is the mysql server version. And this functionality is available only in mysql server 5.7 onwards. Upgrading your client will not solve the problem, you need to upgrade your server.

    Is there a work around? yes. PHP's json_decode

    This can work because your query does not have a WHERE clause. You are looking at the entire table. So you can just as easily fetch all that data and json_decode and then do the processing in your PHP code. This is going to be very slow if you have a lot of data though.

    0 讨论(0)
提交回复
热议问题