int ad_name = int.Parse(DropDownList1.SelectedValue);
int ad_year = int.Parse(DropDownList2.SelectedValue);
int ad_mothe = int.Parse(DropDownList3.SelectedValue);
int ad_game = int.Parse(DropDownList4.SelectedValue);
where a.AD_Name= '9 ' and b.Visit_Date like %200705% and a.Game= '7 '
第一个问题:现在9和7的位置替换成相应的ad_name和ad_game
第二个问题:怎么把ad_year和ad_mothe加在一起放进%%里进行模糊查询???
就剩10分了,多谢
------解决方案--------------------------------------------------------
1.where a.AD_Name= "+ ad_name + " and b.Visit_Date like %200705% and a.Game= "+ ad_game + "
------解决方案--------------------------------------------------------
%200705% 改成 '%200705% '
------解决方案--------------------------------------------------------
%200705% 改成 '%200705% '
------解决方案--------------------------------------------------------
where a.AD_Name= ' "+ ad_name + " ' and a.Game= ' "+ ad_game + " ' and year(b.Visit_Date)= "+ ad_year + " and month(b.Visit_Date)= "+ ad_mothe + "