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
相关文档:
安裝MySQL-Server
$ sudo apt-get install mysql-server
安裝Apache HTTP Server
$ sudo apt-get install apache2
安裝PHP for Apache HTTP Server
$ sudo apt-get install php5
安裝MySQL for Apache HTTP Server
$ sudo apt-get install libapache2-mod-auth-mysql
$ sudo apt-get ......
CentOS下Mysql实现数据库主从同步
一、环境
A服务器: 192.168.10.42 主服务器master CentOS 5 Mysql 5.1.34
B服务器: 192.168.10.68 副服务器slave CentOS 5 Mysql 5.0.56
二、设置Master服务器
1、编辑Master上的/etc/my.cnf文件
......
俺今天这么激动又想写文章的原因是MySQL5.1的发布带来了设计超强动力数据库的强有力的武器,任何MySQL的DBA都应该尽快学习并使用它。俺觉得如果能很好滴使用这个5.1版带来的新特性,DBA可以使自己管理的VLDB(不知道什么是VLDB?告诉你,是好大好大的数据库的意思,Very Large DB)或数据仓库奇迹般的获得巨大的性能提升。 ......
MySQL从4.1开始支持SQL的子查询。这个技术可以使用SELECT语句来创建一个单列的查询结果,然后把这个结果作为过滤条件用在另一个查询中。例如,我们要将客户基本信息表中没有任何订单的客户删除掉,就可以利用子查询先从销售信息表中将所有发出订单的客户ID取出来,然后将结果传递给主查询,如下所示:
DELETE from ......