Home Backend Development PHP Tutorial 一种高效的分页机制,设想阶段,大家快来大讨论拉,欢迎批判_PHP

一种高效的分页机制,设想阶段,大家快来大讨论拉,欢迎批判_PHP

Jun 01, 2016 pm 12:33 PM
id information mechanism discuss stage Efficient

还只是个想法,大家看看,可不可行:

在向数据库插入一条新的纪录后,也就是发布一条信息后,立即对所有数据进行一次分页处理,取得每页的第一个id号,如1134,1100,1080,1033,将这些id号存入数据库或一个文本文件,在信息浏览页,就通过这些id来分页,如
第一页
第二页
第三页

列出每页信息:
sybase_query("set rowcount 20");
sybase_query("select id,title from test where id
哈哈,搞定,由于发信息的人远远少于浏览信息的人数(当然对于本论坛例外),所以这样可可大大减低服务器的负荷,不必每次浏览都对整个表检索一次,对于sybase,mysql,orcal,本方法都应很有效,因为mysql的limit也是要对整个表进行检索的

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

This Apple ID is not yet in use in the iTunes Store: Fix This Apple ID is not yet in use in the iTunes Store: Fix Jun 10, 2024 pm 05:42 PM

When logging into iTunesStore using AppleID, this error saying "This AppleID has not been used in iTunesStore" may be thrown on the screen. There are no error messages to worry about, you can fix them by following these solution sets. Fix 1 – Change Shipping Address The main reason why this prompt appears in iTunes Store is that you don’t have the correct address in your AppleID profile. Step 1 – First, open iPhone Settings on your iPhone. Step 2 – AppleID should be on top of all other settings. So, open it. Step 3 – Once there, open the “Payment & Shipping” option. Step 4 – Verify your access using Face ID. step

Fix event ID 55, 50, 98, 140 disk error in event viewer Fix event ID 55, 50, 98, 140 disk error in event viewer Mar 19, 2024 am 09:43 AM

If you find event ID 55, 50, 140 or 98 in the Event Viewer of Windows 11/10, or encounter an error that the disk file system structure is damaged and cannot be used, please follow the guide below to resolve the issue. What does Event 55, File system structure on disk corrupted and unusable mean? At session 55, the file system structure on the Ntfs disk is corrupted and unusable. Please run the chkMSK utility on the volume. When NTFS is unable to write data to the transaction log, an error with event ID 55 is triggered, which will cause NTFS to fail to complete the operation unable to write the transaction data. This error usually occurs when the file system is corrupted, possibly due to the presence of bad sectors on the disk or the file system's inadequacy of the disk subsystem.

Where can I find Alibaba ID? Where can I find Alibaba ID? Mar 08, 2024 pm 09:49 PM

In Alibaba software, once you successfully register an account, the system will assign you a unique ID, which will serve as your identity on the platform. But for many users, they want to query their ID, but don't know how to do it. Then the editor of this website will bring you detailed introduction to the strategy steps below. I hope it can help you! Where can I find the answer to Alibaba ID: [Alibaba]-[My]. 1. First open the Alibaba software. After entering the homepage, we need to click [My] in the lower right corner; 2. Then after coming to the My page, we can see [id] at the top of the page; Alibaba Is the ID the same as Taobao? Alibaba ID and Taobao ID are different, but the two

Where to check Tencent Video ID Where to check Tencent Video ID Feb 24, 2024 pm 06:25 PM

Where can I check the Tencent Video ID? There is an exclusive ID in the Tencent Video APP, but most users do not know how to check the Tencent Video ID. Next is the graphic tutorial on how to check the Tencent Video ID brought by the editor for users who are interested. Users come and take a look! Tencent Video Usage Tutorial Where to check Tencent Video ID 1. First open the Tencent Video APP and enter the special area through [Personal Center] in the lower right corner of the main page; 2. Then enter the Personal Center page and select the [Settings] function; 3. Then go to Settings page, click [Exit Account] at the bottom; 4. Finally, you can view the exclusive ID number on the page shown below.

C drive space is running out! 5 efficient cleaning methods revealed! C drive space is running out! 5 efficient cleaning methods revealed! Mar 26, 2024 am 08:51 AM

C drive space is running out! 5 efficient cleaning methods revealed! In the process of using computers, many users will encounter a situation where the C drive space is running out. Especially after storing or installing a large number of files, the available space of the C drive will decrease rapidly, which will affect the performance and running speed of the computer. At this time, it is very necessary to clean up the C drive. So, how to clean up C drive efficiently? Next, this article will reveal 5 efficient cleaning methods to help you easily solve the problem of C drive space shortage. 1. Clean up temporary files. Temporary files are temporary files generated when the computer is running.

Features and Advantages of C Language: Why is it one of the most popular programming languages? Features and Advantages of C Language: Why is it one of the most popular programming languages? Feb 23, 2024 am 08:39 AM

Features and Advantages of C Language: Why is it one of the most popular programming languages? As a general-purpose high-level programming language, C language has many unique features and advantages, which is why it has become one of the most popular programming languages. This article will explore the characteristics and advantages of C language, as well as its wide application in various fields. First of all, C language has concise syntax and clear structure. Compared with other programming languages, the syntax of C language is relatively simple and easy to understand and learn. It uses the characteristics of natural language to enable programmers to

Comparing the cost of learning Python and C++: Which one is more worth the investment? Comparing the cost of learning Python and C++: Which one is more worth the investment? Mar 25, 2024 pm 10:24 PM

Python and C++ are two popular programming languages, each with its own advantages and disadvantages. For people who want to learn programming, choosing to learn Python or C++ is often an important decision. This article will explore the learning costs of Python and C++ and discuss which language is more worthy of the time and effort. First, let's start with Python. Python is a high-level, interpreted programming language known for its ease of learning, clear code, and concise syntax. Compared to C++, Python

How to find the parent process ID (PPID) in Linux How to find the parent process ID (PPID) in Linux Mar 09, 2024 am 08:01 AM

In the Linux operating system, each running program is a process, and each process has a unique process identifier (PID). Similarly, each process will have a parent process, which is the process that created it. The identifier of the parent process is called the parent process ID (PPID). In this article, we will explore how to find the ID of a parent process in a Linux system and introduce some effective commands and tools to help you get detailed information about the relationship between processes. Basic commands to find parent process ID First, I will briefly introduce you to a few basic commands that can be used to view all processes running in the system and their parent process ID. Use the ps command to view process information. The ps command is a powerful tool that is used to report

See all articles