Click here to Skip to main content
13,057,050 members (43,919 online)
Rate this:
Please Sign up or sign in to vote.
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);

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

1 solution

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

Solution 1

This just means that totalRecs has no value after findAllJoinBookingTables.

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.170728.6 | Last Updated 14 Mar 2012
Copyright © CodeProject, 1999-2017
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