Sunday, August 22, 2010

How do paging works on blogs? What kind of script/code is it using?

I am wondering how blogs, online journals, xangas etc. know how to display certain number of entries/articles on one page. For example, on Wordpress, you can set to show 10 articles/entries per page.





What kind of script/code(s) make that happen?





What's such "function" call?

How do paging works on blogs? What kind of script/code is it using?
This is generally called pagination or record set enumeration. Pagination is more common with online uses.





It works pretty much the same in all programming languages e.g.





1) Send a query to database to find total number of posts


2) Send a query to the database e.g. find 10 most recent posts


3) Divide total by 10, to give you number of pages


4) Display





Wordpress is PHP, xanga I vaguely remember being python but as I said pretty much any modern language can talk to a database.
Reply:wat site is it on and ill tell you

dental clinic

No comments:

Post a Comment