易截截图软件、单文件、免安装、纯绿色、仅160KB

asp和mysql分页代码

 <!--#include file="zheboconn.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>asp和mysql分页代码</title>
<style type="text/css">
<!--
.STYLE3 {
 font-size: 15px;
 font-family: "宋体";
 color: #000000;
}
img{border:none}
.STYLE1 {
 font-family: "文鼎CS中黑";
 color: #ffffff;
 font-size: 18px;
}
-->
</style>
</head>
<body scroll="no"> //去掉滚动条
  <table width="97%" border="0" align="center" scroll="no">
    <tr>
      <td height="35" valign="top"><%
'asp+mysql分页
Dim strSql,Rs
Dim intRecordNum,intCurrentPage,intRowcount
Dim intPageCount:intPageCount = 5  '每页5条记录
intRowcount = 0
'获得总记录
Set Rs = Conn.Execute("SELECT COUNT(*) As intcounts from  表名")               
If Rs.Eof And Rs.Bof Then
 intRecordNum = 0
Else
 intRecordNum = Cint(Rs("intcounts"))
End If
Dim intTotalPages
If (intRecordNum mod intPageCount)>0 Then
 intTotalPages = Int(intRecordNum/intPageCount) + 1
Else
 intTotalPages = intRecordNum/intPageCount
End If
intCurrentPage = 1
If IsEmpty(Request("intCurrentPage")) Or IsNull(Request("intCurrentPage")) Or Trim(Request("intCurrentPage"))="" Or (Not IsNumeric(Request("intCurrentPage"))) Or Len(Request("intCurrentPage"))>8 Then
 intCurrentPage = 1
ElseIf Clng(Request("intCurrentPage")) < 1 Then
 intCurrentPage = 1
ElseIf Clng(Request("intCurrentPage")) > intTotalPages Then
 intCurrentPage = intTotalPages
Else
 intCurrentPage = Clng(Request("intCurrentPage"))
End If
Set Rs = Nothing
Set Rs = Server.CreateObject("ADODB.RecordSet")
strSql = "SELECT * from  表名  Order By id DESC LIMIT " & (i


相关文档:

asp上传文件代码

add.html
<html>
<head>
<title>无组件上传</title>
</head>
<body>
<form method="POST" name="myform" action="xSave.asp" target="_self">
<input name="PicPath" type="text" id="PicPath" readonly="true">
<input name="sPicPath" type="hidden" id="sPi ......

asp vb.net 在线统计 简单版本 和精确版本

 简单
在Global.asa文件中加入如下的代码:
Java代码
1. <SCRIPT LANGUAGE="VBScript" RUNAT="Server">
2.
3. Sub Application_OnStart
4.
5. '当服务器开启时,设置在线用户计数器为0
6. Application("ActiveUsers") = 0
7.
......

Mysql建表

建立一个主外键关系
create table t_dept(
id int(4) not null, name varchar(50) not null,
primary key(id))type=innodb;
create table t_emp (
id int(6) not null,
name char(255) not null,fk_id int(4) not null,
primary key(id),
foreign key (fk_id) references t_dept (id)) type=innodb; ......

mysql性能优化2

 MySQL从4.1开始支持SQL的子查询。这个技术可以使用SELECT语句来创建一个单列的查询结果,然后把这个结果作为过滤条件用在另一个查询中。例如,我们要将客户基本信息表中没有任何订单的客户删除掉,就可以利用子查询先从销售信息表中将所有发出订单的客户ID取出来,然后将结果传递给主查询,如下所示:
DELETE from ......

MySQL查询的性能优化

查询是数据库技术中最常用的操作。查询操作的过程比较简单,首先从客户端发出查询的SQL语句,数据库服务端在接收到由客户端发来的SQL语句后,执行这条SQL语句,然后将查询到的结果返回给客户端。虽然过程很简单,但不同的查询方式和数据库设置,对查询的性能将会有很在的影响。
因此,本文就在MySQL中常用的查询优化技术进 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号