HTML::Paging::SQL - HTML pagination with SQL database
I think you can use this class in all platforms :)
use HTML::Paging::SQL; my $hp = new HTML::Paging::SQL( all => your total amount of the record data£¬ num => each page layout shows how many data it contains, ); my ($html,$start,$length) = $hp->number( sub => the pagination number is shown in each subsection, bicon => setting down the icon that moves forward£¬ ficon => setting down the icon that moves backward, target => setting target for display window, );
If you use the SQL database, this class can help you divide the page, support th e subsection show of pagination numbers, it is similar to the way shown in the Go ogle's(R) pagination. Under the minimal circumstance you only need to deliver a parameter, and you'll get the pagination result and can have the user-defined of icons jumping forwards or backwards.
For example,according to this way to initialize the class, you should at least d eliver a parameter named "all",which is the total amount of the data you want to show. They each express a subsection of the pagination number on each page.If you do not deliver, num is the default for 10, which means each page will show 10 data.
This method can transmit the HTML code with the digital format, among which num and sub can be separately chosen to deliver parameters, if sub isn't established,the result of the subsection show in page code will be closed; for example, sub is 4, you'll see the result similar to << 5 6 7 8 >> in the return html code. On the condition of a lot of data, it is of great use; in this way you can choose two parameters to establish the page number icons for jumping forwards or backwards. These two parameters are both "bicon" and "ficon". if you want to specify a target window for display, you can set "target" parameter. If they are not set up, the system will adopt "<<"AND">>" for tacit jump icons. After executing this method successfully, it will rebound 3 parameters;the 1st stands for the HTML code of page number,the 2nd for the limit first parameter in SQL,the 3rd for the limit second parameter in SQL.If the 2 nd and 3rd names stand for $start and $length, you can use it: "select* from table limit $start,$length".
Wang Aocheng <wangaocheng@hotmail.com>
English: Wang Zhonghua <wzh2k@163.net>
1 POD Error
The following errors were encountered while parsing the POD:
Non-ASCII character seen before =encoding in 'data£¬'. Assuming CP1252
To install HTML::Paging::SQL, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTML::Paging::SQL
CPAN shell
perl -MCPAN -e shell install HTML::Paging::SQL
For more information on module installation, please visit the detailed CPAN module installation guide.