Jump to content
  • 0

Itemizer PHP


Virtue

Question


  • Group:  Members
  • Topic Count:  92
  • Topics Per Day:  0.02
  • Content Count:  354
  • Reputation:   22
  • Joined:  11/17/11
  • Last Seen:  

Hi

 

I have been looking at this and now I am wondering how do I put a pagination system at the Itemizer php from this

 

http://rathena.org/board/topic/60513-event-ticket-rewarder-php-log-viewer-anti-gm-corruption/

 

i tried myself but i am having no luck though.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.00
  • Content Count:  88
  • Reputation:   23
  • Joined:  01/30/12
  • Last Seen:  

Change this block to:

	// SQL query
	$limit = ( isset($_GET['limit']) ? intval ($_GET['limit']) : 0 );	
	$strSQL = "SELECT * FROM itemizer ORDER BY id DESC LIMIT ".$limit.", 100";
So, you will limit the result to 100 entries and can paginate in the browser (query string) by adding limit=(number)

Eg:

http://localhost/itemizer.php?limit=10 will display 100 results after the 10 first.

Link to comment
Share on other sites

×
×
  • Create New...