When I try to run this simple JSON_EXTRACT and JSON_UNQUOTE select statement using the shorthand ->>, I get results like 0x4173686C (image below).
If I run c.d->"$.first_name" I don't see the odd encoding but rather the quoted version of the name. I want to remove the quotes from the results of course.
This issue seems to come and go for me. I had it resolved a while back but I never knew how I resolved it. Has anyone else found a workaround or a reason this occurs? I've been searching everywhere for an answer.
I don’t have a MySQL database to access right now, only MariaDB which doesn’t support the shorthand.
But some databases are pretty sensitive and distinguish between single ' and double " quotes.
And you say that sometimes it works. Do you mean that for the same query it would sometimes work and other times fail, or do you mean that some queries it works, but other not?
If the former, then you should be able to see the exact query in the internal database table query.
If the latter, could it have anything to do with Field Type, which is defined in Admin Settings > Data Model? There’s a “Field contains JSON” type.