批量生成静态页面(求助+急)
问题?
1.这样做的很麻烦 请大家给个更好的方法?
2.我的数据库中有896条记录,都是复制的,现在我要实现分页的功能怎么做?
每页显示100条
1.这样做的很麻烦 请大家给个更好的方法?
2.我的数据库中有896条记录,都是复制的,现在我要实现分页的功能怎么做?
每页显示100条
SQL> insert into TB_ATICLE(title,article, articledatetime,articlesgroup_parent_id,articledescription
)
2 select title,article, articledatetime,articlesgroup_parent_id,articledescription from tb_aticle
;
已创建448行。
SQL> commit;
模板页:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>Index</title>
</head>
<body>
<div> $htmlformat[0]</div>
<br />
<div> $htmlformat[0]</div>
</body>
</html>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title> $htmlformat[0]</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="style.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
<!--
body { margin:0px; font-size:12px;
}
p{text-indent:24px; text-align:left;}
.browser{ border-collapse:collapse; text-align:center; width:95%;}
.PPT{border:1px solid #64b7d7; padding:0px 0px; word-wrap: break-word; word-break:break-all;}
-->
</style>
<!-- 式样表自己制作 -->
</head>
<body>
<table border="0" cellspacing="0" cellpadding="0" style="width:800px;">
<tr><!--文章导航 -->
<td align="left" class="PPT" style="height:30px"> $htmlformat[4]</td>
</tr>
<tr><!--文章的标题 -->
<td align="center" class="PPT" style="height:30px" > $htmlformat[0]</td>
</tr>
<tr><!--发表时间 -->
<td align="center"class="PPT" style="height:30px"> $htmlformat[5] $htmlformat[1]</td>
</tr>
<tr><!--文章概述 -->
<td align="left" class="PPT" style="height:60px" valign="top"> $htmlformat[6]<br/>$htmlformat[2]</td>
</tr>
<tr><!--文章内容 -->
<td class="PPT" style="height:200px" valign="top"> $htmlformat[3]</td>
</tr>
</table>
</body>
</html>
数据库:
Article表
create table Aticle
(
Articles_id number(20) primary key,/*自增*/
title varchar2(50) not null,
Article varchar2(3500) not null,
Articledatetime date default sysdate,
Articlesgroup_parent_id number(6),
Articledescription varchar2(500) not null
)
创建自动增长序列
CREATE SEQUENCE newsID_Sequence
INCREMENT BY 1 -- 每次加几个
START WITH 1 -- 从1开始计数
NOMAXVALUE -- 不设置最大值
NOCYCLE -- 一直累加,不循环
NOCACHE -- 不建缓冲区
创建触发器
CREATE TRIGGER newsID_Increase BEFORE
insert ON Aticle FOR EACH ROW
begin
select newsID_Sequence.nextval into:New.Articles_id from dual;
end;
提交
commit;
Articlesgroup表
create table Articlesgroup(
Articlesgroup_id number(6),
Groupname varchar2(100) not null,
Articlesgroup_parent_id number(6),
Groupdescription varchar2(500) not null
)
insert into Articlesgroup(Articlesgroup_id,Groupname,Articlesgroup_parent_id,Groupdescription)
values(11,'ASP.NET',1,'IT专区');
insert into Articlesgroup(Articlesgroup_id,Groupname,Articlesgroup_parent_id,Groupdescription)
values(12,'Oracle数据库',1,'IT专区');
insert into Articlesgroup(Articlesgroup_id,Groupname,Articlesgroup_parent_id,Groupdescription)
values(13,'J2EE',1,'IT专区');
ALTER TABLE Aticle RENAME TO tb_Aticle;
insert into tb_Aticle(title,Article,Articlesgroup_parent_id,Articledescription)
values('','',11,'')
...全文
相关推荐
html静态页面生成
通过.NET后台,批量生成静态html页面,实用性强且容易掌握。
Ajax+Asp实现批量生成静态页面进度条
Ajax+Asp实现批量生成静态页面进度条 Ajax+Asp实现批量生成静态页面进度条
ASP批量生成静态页面的写法(批量生成技巧iframe)
代码如下: <!– #include file=”../conn.asp” –> <!– #include file=”../cls_main.asp” –> <html> <head> <meta http-equiv=”Content-Language” content=”zh-cn”> <meta http-equiv=”Content-Type” content=”text/html; charset=gb2312″> <title>生成百度XML</title> </head> <body> <% dim sid,eid sid=abs(request(“sid”)) if sid=
基于ASP的Ajax+ASP实现批量生成静态页面并带进度条显示.zip
基于ASP的Ajax+ASP实现批量生成静态页面并带进度条显示.zip
ASP批量生成静态页面教程
ASP批量生成静态页面教程


