Click here to Skip to main content
Rate this: bad
good
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
Edited 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
0 OriginalGriff 216
1 CPallini 195
2 BillWoodruff 180
3 Maciej Los 165
4 Kornfeld Eliyahu Peter 140


Advertise | Privacy | Mobile
Web04 | 2.8.141015.1 | Last Updated 14 Mar 2012
Copyright © CodeProject, 1999-2014
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