摘要: 遇到这样一个问题,存储在数据库的数据是一串字符串如:1,2,3,4,5,6。想把这串字符串进行转变成一个表格,如下:123456就是这样一个问题,有人同事,写了一个这样的封装函数,这样就方便多了,使用方法如下:DECLARE @IdString nvarchar(max)Select @IdString=FMenu from dbo.T_Groups where Fgroupsid=1DECLARE @tTable TABLE ( tId int )INSERT @tTable ( tId ) select Item from dbo.Func_Splitstring(@IdString,&# 阅读全文
posted @ 2013-10-18 16:46 春天又来了 阅读(413) 评论(0) 推荐(0) 编辑
摘要: IntroductionThis article introduces Entity Framework to absolute beginners. The article is meant for developers who are primarily using ADO.NET to write their data access layers. Many experienced developers will find this article very basic but since the article is written from the perspective of be 阅读全文
posted @ 2013-10-18 10:38 春天又来了 阅读(468) 评论(0) 推荐(0) 编辑
摘要: 我们有时候需要查找出父菜单下面全部的子菜单,然后根据子菜单的ID查找出该类别下面的全部新闻。 通常往往只知道父级菜单的ID,但不知道父级菜单下面有多少个子菜单,也不知道子菜单的ID 所以我们往往需要根据这一条SQL语句:select 子菜单ID from 表 where 父菜单ID=Id 找出全部的子菜单ID。 然后根据子菜单ID去查找出该类别下面的全部新闻 使用Repeater嵌套可以很方便实现这一点,示例如下: 前端HTML示例: '>更多 ... 阅读全文
posted @ 2013-10-18 08:22 春天又来了 阅读(449) 评论(0) 推荐(0) 编辑