php - Search inside serialize data with MYSQL -


i'd search inside serialized array, data :

a:7:{i:0;s:2:"34";i:1;s:1:"0";i:2;s:2:"42";i:3;s:2:"33";i:4;s:2:"48";i:5;s:2:"62";i:6;s:2:"47";}

i tried this:

$id_serialize = '"'.$id.'"'; $req = requette("select id table col '%$id_serialize%'");  

but it's not working, solution? thanks.

your query formatted little wrong. if trying pass $id_serialize query, needs formatted this:

$id_serialize = $id; $req = requette("select id table col '%" . $id_serialize . "%'"); 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -