₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,325,957 members, 8,424,338 topics. Date: Thursday, 11 June 2026 at 03:43 AM

Toggle theme

Icekelv's Posts

Nairaland ForumIcekelv's ProfileIcekelv's Posts

1 (of 1 pages)

ProgrammingRe: Urgent Help Need! Pagination With Php by Icekelv(op): 5:16pm On Apr 09, 2015
This aint fair; @akisetek; nairaland is a forum not a business market; I posted dat I needed help; so den y chargin me on phone?

If there's anybody here who which to help me; u are free! nd God bless!
ProgrammingUrgent Help Need! Pagination With Php by Icekelv(op): 3:28pm On Apr 09, 2015
Hi guys; am workin on a project with php n MysQl,
And there is a page which I need to display some rows from the database table; the rows inside the table is more than 500, so I want to add a pagination to it that display 50 rows/ when u click (next»),

But am finding it difficult to code the pagination part;

This was how I selected my rows

$select_sql = "SELECT username,age FROM users";
$select_qry = mysql_query($select_sql) or die (mysql_error());
while ($row_select = mysql_fetch_array($select_qry))
{
$username = $row_select['username'];
$age = $row_select['age']

echo "$username is $age<br/>"
}


That particular code shows the number of rows which is 500;
I want to split it to 50,
e.g
If a user opens d page, 50 rows will show;
Then if the user click (next») or (1») another 50 will show, so on and so forth,!

The pagination type can be; (Next» |«Previous) or (1)(2)(3)

I will be so glad If u can help!

1 (of 1 pages)