⚠ In case you've missed it we are migrating to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This forum is read-only and soon will be archived. ⚠


Member Since 29 May 2013
Offline Last Active Oct 02 2014 11:26 PM

Topics I've Started

How can I show the total number of results/rows

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.

How to use callback_column functions from a helper file?

31 July 2014 - 06:23 PM

CodeIgniter lets you organize all your functions inside helpers files. This is great, because I reuse the same functions in some controllers and I have to copy/paste all of them from one to another, so the idea of using a single file is a lot better.


So, I need to put all my "callback_column functions" inside a helper file for a better management. But, once this is done, how can I call/use the function in the controller?


P.S. I am not that good with Object Oriented Programming, so please be gentle :(

How set_relation affects unset_column?

13 May 2014 - 10:08 PM

EDIT: Nevermind, it works now. Just a typo in my code :)



Hi guys



I'm having a problem with unset_column()

Grocery CRUD 1.3


I need to hide certain columns based on roles (using ion_auth), so I have this:

$my_group = array('admin', 'editor', 'colab');
if (!$this->ion_auth->in_group($my_group))
         $crud->unset_columns( 'A', 'B', 'C', 'D'); 

'A', 'B', and 'C' are unset without problems, but column 'D' is still showing.

The column D data is retrieved with "set_relation" from 2 tables.


Why? How set_relation affects unset column?