Click here to Skip to main content
12,451,425 members (49,993 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: PHP
$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 13-Mar-12 17:44pm
chopoe463
Updated 13-Mar-12 19:22pm
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

This just means that totalRecs has no value after findAllJoinBookingTables.
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160826.1 | Last Updated 14 Mar 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100