Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
$offset = $pageSize*($page-1);
$totalRecs = $this->Booking_model->findAllJoinBookingTables("1=1 group by `bookings`.`id`", "COUNT(*) as count");
$totalCount = $totalRecs[0]['count'];
		
$offset = $pageSize*($page-1);
$totalPages = ceil($totalCount/$pageSize);
$this->db->limit($pageSize,$offset);



i got an Message: Undefined offset: 0 error ..pls help me how to fix it.
Posted
Updated 13-Mar-12 19:22pm
v2

1 solution

This just means that totalRecs has no value after findAllJoinBookingTables.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900