案例:数据库存储的json进行模糊搜索
$text = $data['text'];//leyangjun //$text = preg_replace("/\s/", "", $text); if (!empty($text)) { $json_text = str_replace("\\", "_", json_encode($text)); $json_text = strval($json_text); $mSql .= " AND field_content like '%" . $json_text . "%' "; }