Hi I am working on a Select Query that combines two relational tables with customer information. The field called 'options' contains a lot of JSON information.
I found a similar article however I am unable to make it work within the context of the existing query and the server gives an error message function 'JSON_EXTRACT' does not exist. Upon further review we discovered that the server itself does not have the JSON_EXTRACT function.
Is it possible to simply use % % between two strings?
i.e. select between {"TransactionID":" and "}
just interpreting the JSON ourselves rather than relying on a server function.
Here is the query
select u.Email, u.Name, up.Type, up.Name, up.Price, up.options from users_packages
inner join users u on up.UserID = u.id
The options field reveals this value for example:
{"TransactionID":"4G631007P6080114Y39840"}
I'm looking for a query that will give me only the value i.e. '4G631007P6080114Y39840' and extract the JSON of the TransactionID. Note, some of the other json elements may be there other than TransactionID
Thanks!
See https://stackoverflow.com/questions/49063684/mysql-extract-json-element-from-array
select version())?JSON_EXTRACT()are not available in 5.5. If you want to work with JSON, you should really consider upgrading (besides, 5.5 is a really old version, which is out of support).