Hello, Is there a way to check if a value is within a json_encoded table column??? in combo with php i have something like function totPerWorkshop($id){ $q = "SELECT * FROM tblWorkshop WHERE workshops = $id" } Code (markup): where workshops is a column which stores json_endoced values (for example: ["3","10"]) How to do this with mysql??? regards
You could probably use a regular expression to check. However, this is normally handled on the application level. You should be able to simply use json_decode. If it return NULL it is not JSON, otherwise it is.