Page 1 of 1

pages

Posted: Mon Aug 12, 2002 4:11 am
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

Posted: Mon Aug 12, 2002 7:33 am
by fatalcure

Code: Select all

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