惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Google Online Security Blog
Google Online Security Blog
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
AI
AI
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
N
News | PayPal Newsroom
G
GRAHAM CLULEY
V
Vulnerabilities – Threatpost
Cisco Talos Blog
Cisco Talos Blog
Hacker News - Newest:
Hacker News - Newest: "LLM"
P
Privacy & Cybersecurity Law Blog
Google DeepMind News
Google DeepMind News
L
LangChain Blog
T
Tailwind CSS Blog
腾讯CDC
C
CXSECURITY Database RSS Feed - CXSecurity.com
The Cloudflare Blog
Spread Privacy
Spread Privacy
月光博客
月光博客
WordPress大学
WordPress大学
C
CERT Recently Published Vulnerability Notes
小众软件
小众软件
AWS News Blog
AWS News Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
O
OpenAI News
W
WeLiveSecurity
H
Heimdal Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
V
Visual Studio Blog
The Last Watchdog
The Last Watchdog
有赞技术团队
有赞技术团队
量子位
TaoSecurity Blog
TaoSecurity Blog
V
V2EX
罗磊的独立博客
雷峰网
雷峰网
Latest news
Latest news
Jina AI
Jina AI
Simon Willison's Weblog
Simon Willison's Weblog
博客园_首页
博客园 - 聂微东
L
Lohrmann on Cybersecurity
V2EX - 技术
V2EX - 技术
T
The Exploit Database - CXSecurity.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Security Latest
Security Latest
Help Net Security
Help Net Security

博客园 - Chep

招聘 dotNet c# asp.net 、Windows Mobile 、iPhone 开发人员,工作地上海 iblogs博客程序1.0版 求一问题的解决方法 .TEXT 修改 二 - Chep [转载]防止盗链下载问题 微软.net精简框架常见问题及回答(中文版) 博客RSS 使用完全手册 主流 Blog 程序 添加 免责声明 Gif 文件格式译解 Visual Studio.Net鲜为人知的技巧 DotNet 网上资源 gif 文档 .net学习:显示/播放Gif动画 在.NET中实现彩色光标和自定义光标 创建基于 Microsoft .NET Framework 精简版的动画控件 Windows Mobile-一个新时代的开始 关于跨站验证 关于更新blog
对.text的修改(1)
Chep · 2005-05-17 · via 博客园 - Chep

--查找最新的图片
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[blog_GetNewImages]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[blog_GetNewImages]
GO

SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

CREATE   Proc blog_GetNewImages
(


 @Count int,
 @IsActive bit
)
as
set rowcount @Count
Select blog_images.Title, blog_images.CategoryID, blog_images.Height, blog_images.Width, blog_config.Application, blog_config.Application+'/'+convert(varchar(8),blog_images.CategoryID)+'/t_'+blog_images.[File] as [File], blog_images.Active, blog_images.ImageID From blog_Images,blog_config
where blog_config.blogid=blog_images.blogid and blog_images.Active <> Case @IsActive When 1 then 0 Else -1 End
order by UploadTime desc


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

-----取得专题排行
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[blog_GetCategoriesTop]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[blog_GetCategoriesTop]
GO

CREATE Proc blog_GetCategoriesTop
(
 @IsActive bit=null,
 @CategoryType tinyint,
 @ParentID int=null,
 @Count int
)
As
set rowcount @Count
if(@ParentID is not null)
Begin
select  blog_LinkCategories.CategoryID, blog_config.Application,blog_LinkCategories.blogID,blog_LinkCategories.Title, blog_LinkCategories.Active,
blog_LinkCategories.CategoryType, blog_LinkCategories.[Description],ParentID ,t.blogcount
FROM blog_LinkCategories,blog_config,(select count(*) as blogcount ,categoryid from blog_links group by categoryid) t
where blog_config.blogid = blog_LinkCategories.blogID and blog_LinkCategories.ParentID=@ParentID and blog_LinkCategories.CategoryType = @CategoryType
and blog_LinkCategories.Active <> Case @IsActive When 1 then 0 Else -1 End and t.categoryid=blog_LinkCategories.CategoryID
ORDER BY blogcount desc;
End
Else
Begin
SELECT blog_LinkCategories.CategoryID,blog_config.Application,blog_LinkCategories.blogID, blog_LinkCategories.Title, blog_LinkCategories.Active,
blog_LinkCategories.CategoryType, blog_LinkCategories.[Description],ParentID,t.blogcount
FROM blog_LinkCategories ,blog_config,(select count(*) as blogcount ,categoryid from blog_links group by categoryid) t
where  blog_config.blogid = blog_LinkCategories.blogID and blog_LinkCategories.CategoryType = @CategoryType
and blog_LinkCategories.Active =@IsActive and t.categoryid=blog_LinkCategories.CategoryID
ORDER BY blogcount desc
End


GO