Answer the question
In order to leave comments, you need to log in
How to find value in serialize array?
There is, for example, such an array in mysql a:3:{i:0;s:1:"9";i:1;s:2:"12";i:2;s:2:"13";}
. Is it possible to somehow determine whether it contains the value '9' without converting it to a php array?
That is, at the select stage.
But you need to find exactly the value, because if there is something like that a:3:{i:0;s:9:"11"}
and there is 9, this will not work.
Answer the question
In order to leave comments, you need to log in
Bring data storage back to normal. And you will have a simple and quick search at the subd level.
better store data in JSON
mysql 5.6+ allows you to search for data by json
although there is an amusing option here
https://github.com/junamai2000/mysql_unserialize_php
not sure what works, it seems you need to compile this miracle as a plugin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question