СµÜÔÚ×ö²éѯÆ÷µÄʱºòÓõ½ string str = "select *from Info where 1=1 ";//1=1ΪÓÀÕæÀ´ÊµÏÖÆ´½Ó²éѯÌõ¼þÆ´½Ó¡£ µ«ÎÒÏëʵÏÖÆ´½Óºó°´Ê±¼äÅÅÐò¼´ string str = "select *from Info where 1=1 order by Published Desc";//1=1ΪÓÀÕæ È´³öÏÖÎÊÌâÁË£¬ÏÂÃæÊÇ´íÎóÌáʾ Óï·¨´íÎó (²Ù×÷·û¶ªÊ§) ÔÚ²éѯ±í´ïʽ 'Publishedand Ttype like '%%' or Bname like '%%' or Area like '%%' or address like '%%' or Fee like '%%' or Houspro like '%%' or Tnature like '%%' or Unit like '%%' or Comyears like '%%' or Payments like '%%' or Traffic like '%%'' ÖС£
Çë½Ì¸÷λ¸ßÊÖ¸ÄÈçºÎ½â¾ö£¬O(¡É_¡É)Oлл..Ã×¼û¹ýÕâÖÖ´í string str = @"select * from Info where 1=1 order by Published Desc"; *ºóÃæÓ¦¸ÃÓиö¿Õ¸ñ£» where Ìõ¼þºóÖ»ÄÜÊÇ£ºcolumnÏà¹ØµÄÌõ¼þ £» ºÍÕâÑùûÓÐÇø±ð°¡£º string str = @"select * from Info order by Published Desc";
SqlConnection conn = CsDB.sqlcon(); SqlDataAdapter da = new SqlDataAdapter("select fwCoding from bjmuma_fwCoding where OrderNumber='" + Order + & ......