Jump to content


How can I show the total number of results/rows


  • Please log in to reply
2 replies to this topic

#1 edgarvaldes

edgarvaldes

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 03 September 2014 - 05:02 PM

I use

 

$this->grocery_crud->where('field IS NOT NULL');

 

So,  I just want to add something like this at the top of the page:

 

"We have X records with that criteria"

 

using an existing method of CodeIgniter or GroceryCrud, instead of using a manual php code to count the rows.

 

Thanks in advance.



#2 Amit Shah

Amit Shah

    grocery CRUD Master

  • Advanced Member
  • PipPipPip
  • 1,192 posts
  • LocationMumbai, India

Posted 04 September 2014 - 03:45 AM

Grocery crud already shows you how many items it are actually available for the given criteria

you can pull the same using javascript from the id  - total_items

That way u can fetch the data without firing any query or so



#3 edgarvaldes

edgarvaldes

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 04 September 2014 - 06:13 PM

Hi, Amit

 

Grocery crud already shows you how many items it are actually available for the given criteria

 

Can you elaborate, please? I can't find anyting in the documentation. :unsure:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users