I have a mysql (v5.7.23) table contain a json object like this
[{
"plant_part": "Leaves, Seed",
"extract_type": "Ethanol",
"activity": "Colon Cancer",
"reference": "6"
},
{
"plant_part": "Leaves, Seed",
"extract_type": "Ethanol",
"activity": "Lung Cancer",
"reference": "6"
}]
Now i want to get value from only the "activity" key. and this is what I'm trying.
$sql = "select * from table where column like '%".$term."%';
but this will select all value from that column. Is there any way get result from specific key?
I mean something like this?
$sql = "select * from table where column.activity like '%".$term."%';
Thank you.