public static DataTable Search(string freeKeyWords , string[] keyWordFields)  // keyWordFields where 条件中 出现 的字段集合
//freeKeyWords  用户输入的关键字(一个或多个)
{ ArrayList arr =  GetKeywordsArray(freekeyWords);            //把freeKeyWords  变成集合


string[] group = new string[arr.Count * keyWordFields.Length];
for(.....)
{
group[i]=string.Format(" {0} like '%{1}%'",keyWordFields[j],arr[i]);
}

string[] operators = new string[2];               
operators[1] = "or";
operators[0] = "and";要求用 group[]中的所有字段去匹配or 或 and 即where 后面总是有 group.length个条件 只是中间的 or 或 and 不同求 where 后面所接条件的所有情况.