String str=this.textbox1.text.trim();
string [] strs=str.split(' ');//ÕâÀïÊDzéѯÌõ¼þµÄÊý×é
string sql=" select * from ±í where "
string condition="";
for(int i=0;i<strs.length; i++)
{
if(condtion=="")
{
condtion= " name='"+ strs[i] +"' ";
}
else
{
condtion = condtion + " or name ='" + str[i] + "' ";
}
}
×îºóµÄ²éѯÓï¾ä string sqls= sql+condtion;
È»ºó¸ù¾ÝÕâ¸ösql Óï¾ä²éѯ¾Í¿ÉÒÔÁË£»ÕâÏÂÄãÃ÷°×ÁË ÉÏÃæÐ´µÄÄǸöÑ»·¾ÍÊÇΪÁËÆ´×Ö·û´® |