⚠ 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. ⚠


Malay Mondal

Member Since 13 Jan 2014
Offline Last Active Jan 13 2014 11:11 AM
-----

Posts I've Made

In Topic: Column 'is_active' in where clause is ambiguous

13 January 2014 - 11:11 AM

I've found the solution...
 

function choices() {
        /* TODO : Add validation */
        $crud = new clematis_grocery_CRUD();

/*

 

other codes

 

*/

        $crud->columns('menu_id', 'choice_name', DB_PREFIX . 'choice.is_active');
        $crud->callback_column(DB_PREFIX . 'choice.is_active', array($this,'_callback_is_active'));
        $crud->display_as(DB_PREFIX . 'choice.is_active', 'Active');
 
        $output = $crud->render();
        $this->_grid_output($output);
    }

 

 
 
function _callback_is_active($value, $row) {
        return $row->is_active;
    }