pages

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
prasadharischandra
Forum Commoner
Posts: 57
Joined: Thu May 09, 2002 2:19 am
Location: sri lanka
Contact:

pages

Post by prasadharischandra »

my code is

$limit=31;
$Prev = "Previous";
$Next = "Next";

$numresults=mysql_query("select * from pase_res where (pas_rtn_flight ='$manifest_ticketno' and pas_rtn_status ='B')or (pas_dep_flight='$manifest_ticketno' and pas_dep_status='B')");
$numrows=mysql_num_rows($numresults);

if (empty($offset))
{
$offset=0;
}
$pages=intval($numrows/$limit);

if ($numrows%$limit) {
$pages++;
}

i want to find a full total number
i echo $pages;
but it's comming wrong answer
fatalcure
Forum Contributor
Posts: 141
Joined: Thu Jul 04, 2002 12:57 pm
Contact:

Post by fatalcure »

Code: Select all

$pages = ceil($numrows / $limit);
:)
Post Reply