SELECT * FROM table limit 0,10//Top 10 records
SELECT * FROM table limit 10,10//11th to 20th record
SELECT * FROM table limit 20,10//21st to 30th record
......
Copy CodeThis set of SQL statements is actually a
$Model->where (' Status=1 ')->order (' id desc ')->limit (5)->select ();
Copy CodeNote: There is no order for coherent operations, and you can arbitrarily change the order of calls before the Select method is called.Support for sorting multiple
This article describes how CodeIgniter enables caching and clearing the cache, depending on the page cache, the page can be nearly static page loading speed, because the results of the program output saved to the hard disk.
CodeIgniter
Header ("content-type:text/html; Charset=xxx ")
Adddefaultcharset xxx
Copy CodeIt is recommended to add a header for each page ("content-type:text/html; Charset=xxx "), so that it can be displayed correctly on any server, portability is
Copy Code
Class subpages{
Private $each _disnums;//The number of entries displayed per page
private $nums;//Total number of entries
Private $current _page;//the currently selected page
Private $sub _pages;
It's always so fast in a brother's day, Always feel the time is so from the point of flow away, trying to hold tight, but powerless! Now it is almost time to sprint, the knowledge of the brain loaded, but are fragmented, has not been strung into a
Chmod-r 777 HTML
Copy CodeModify a directory for any user with write read Execute permission
chmod a+rwx HTML
Copy Code2. Set the root directory of the uploaded files
Siteroot
/*
* @im//Picture resources that need to be scaled
* @filetype//production of thumbnail file type
* @dstimW//Zoom the width of the picture
* @dstimH//height of the picture to zoom
* @thumbname//thumbnail file name
/******* Paging principle *********/
Number of record bars per page
$page _size = 3;
$sql = "SELECT * from Message";
$result = mysql_query ($sql);
Total number of records
$num = mysql_num_rows ($result);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service