first select ,then explode to an array in PHP.

解决方案 »

  1.   

    可直接用条件来判断,比方说:
    $result = mysql_query("select * from `yourTable` where `yourFieldName`='aaa'");//其它类似
    二:也可像楼上说的,取出来再判断:
    $content = array();
    $row = mysql_fetch_array($result);
    if ( $row['name'] == 'aaa' || $row['name'] == 'bbb' || $row['name'] == 'lzl' )
    {
       array_push($content, $row['name']);
    }
    return $content;
      

  2.   

    如下,(当然,速度不会太快)SELECT * 
    FROM tablename
    WHERE concat( ',', fieldname, ',' ) LIKE concat( '%,', 'aaa', ',%' ) 
      

  3.   

    简单的就是最好得, 搜出来用程序处理
    如果数据量大, 就用helloyou0(你好!) 的.
    如果还不行, 重新调计个表好了.