Normally, the first param of where() is the name of table column. You just correct that.
where('justPutYourTableColumnName', $reply->id)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
My webhost's MySQL version is 10.0.32-MariaDB. Whenever I try to query a JSON column like so:
where('data->model', $reply->id)
I get the following error:
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 '>'$."model"
This is because my webhost's MySQL version apparently doesn't support JSON column types. (query works on my Homestead but not on my webhost)
How else am I meant to query a JSON column? Is changing my MySQL version the only option I have? (not even sure if that's possible with my shared hosting)
Please or to participate in this conversation.