Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ÇóÖúÒ»ÌõSQL likeÓï¾ä! - .NET¼¼Êõ / ASP.NET

ÇóÖúÒ»ÌõSQL likeÓï¾ä!

table

ID name bran_id
1 ss 1,2
2 aa 10,13
3 cc 1,13,15


µ±bran_id like 1 µÄʱºò£¬½á¹ûÏÔʾµÄÊÇID=1ºÍµÈÓÚ3µÄ£¬¶ø2²»ÏÔʾÒòΪID=2µÄbran_id,ÊÇ10ºÍ13

ÇëÎÊÎÒÕâÌõSQLÓï¾ä¸ÃÔõôд£¿
×Ô¼º¶¥Ò»ÏÂ

bran_id like '%1,%' or '%,1,%' or '%,1%'

string strlike='1'

where ','+bran_id+',' like '%'+ strlike +'%'

string strlike='1'

where ','+bran_id+',' like '%,'+ strlike +',%'

SQL code:
select * from table where bran_id like '%1%'


bran_id like '%1,%' or '%,1,%'

ÒýÓÃ

bran_id like '%1,%' or '%,1,%'


bran_id like '1,%' or '%,1,%'

SQL code:

select * from table where '%ÄãµÄ×Ö·û´®+','%' like bran_id+','



ÒýÓÃ

×Ô¼º¶¥Ò»ÏÂ

ÎÒ¿´´íÁË£¬ËûÃǵĶÔ

select * from table where bran_id like '%1%'

ÒýÓÃ
ÒýÓà 6 Â¥ kkbac µÄ»Ø¸´:

bran_id like '%1,%' or '%,1,%'


bran_id like '1,%' or '%,1,%'


11

select * from [±íÃû]
where bran_id like '%1,%'
{


Ïà¹ØÎÊ´ð£º

ÇóÒ»¸öSQLÓï¾ä - MS-SQL Server / »ù´¡Àà

×Ö¶Î1,×Ö¶Î2.....×Ö¶ÎN,Status,ParentID
1,Name1....test1,1,99
1,Name1....test1,3,99
1,Name2....test2,1,101
1,Name2....test2,3,101
1,Name3....test3,2,101
1,Name1....test1,4,101
ÏëÒªµÄ½á¹ûÊÇ:
1,Na ......

ASPÒ³ÃæÎÞ·¨´ò¿ªÇóÖú£¡ - MS-SQL Server / »ù´¡Àà

¸÷λºÃ£¬ÎÒ¸Õ°ÑÒ»¸öASPÍøÕ¾ÉèÖúÃÁË£¬Ò²ÄÜÕý³£·ÃÎÊ¡£µ«ÊÇÔÚÎÒ±¾»úÉϲ»ÄÜ´ò¿ªadmin\login.asp,ËùÒÔÎÞ·¨ÊµÏÖºǫ́¹ÜÀí¡££¨´íÎóÌáʾÎÞ·¨ÕÒµ½ÍøÒ³£¬´úÂë404£¬ÎҵIJÙ×÷ϵͳÊÇwin2000 server)
µ«ÊÇÆæ¹ÖµÄÊÇÔÚ¾ÖÓòÍøµÄÆäËû» ......

C# SQL µÄUPDATETEXT ÎÊÌâ - .NET¼¼Êõ / C#

A±í ÓÐÁ½¸ö×ֶΠ
  id ΨһÊý×ÖÓò
  InfoTxt text ÀàÐÍ
 ÎÒÏÖÔÚÒª°Ñ id ²»ÊÇ14 µÄËùÓÐ InfoTxt×ֶΠÎı¾ºóÃæ ¶¼¼ÓÉÏ 'aaa' 
°´ÏÂÃæÖ´ÐÐÏÂÀ´ Ö»Óбí×îºóÒ»ÐмÓÉÏÁË 'aaa' ......

asp.net ÕýÔò - .NET¼¼Êõ / ASP.NET

<table   border= "0 "   cellspacing= "0 "   cellpadding= "0 ">
<BH_CHANNELS   ID= "OWNER "   CHILDTYPE= "aaa " ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ