⚠ In case you've missed it, we have migrated 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 is an archived forum. ⚠

  •     

profile picture

Simple View Works for One Table, but Not the Other



ahairyjello
  • profile picture
  • Member

Posted 07 May 2013 - 01:25 AM

Hi friends,

 

First off, let me say 'Thanks!' for writing this great piece of code.

 

Code:

 

    function items()
    {
        try{
            $crud = new grocery_CRUD();

            $crud->set_theme('datatables');
            $crud->set_table('items');
            
            $crud->unset_fields();
            $crud->unset_texteditor();
            $crud->unset_add();
            $crud->unset_delete();
            $crud->unset_edit();
            
            $crud->required_fields('id');
            
            $output = $crud->render();
            
            $this->output($output);
            
        }catch(Exception $e){
            show_error($e->getMessage().' --- '.$e->getTraceAsString());
        }
    }
 

^This is inside my controller, which does $this->load->view('file.php',$output) to output to the view (well, duh).

 

I have 2 tables in my database: auctions, and items. The exact same code works perfectly for "auctions," but only displays a blank page for "items."

 

The only thing I can think is that I might be maxing out some sort of limitation, since "auctions" is only 500+ records with 11 columns, but "items" is 220,000+ records with 17 columns.

 

Any help would be much appreciated! I have been pulling my hair out on this one all day!


ahairyjello
  • profile picture
  • Member

Posted 07 May 2013 - 01:56 AM

I have found that it is an issue with the theme. For whatever reason, everything works with flexigrid. But I would prefer to use datatables if possible


davidoster
  • profile picture
  • Member

Posted 07 May 2013 - 09:25 AM

Interesting!


victor
  • profile picture
  • Member

Posted 08 May 2013 - 19:44 PM

datatables theme is not appropriate in this case!!! your data has too large size.


ahairyjello
  • profile picture
  • Member

Posted 16 May 2013 - 01:43 AM

datatables theme is not appropriate in this case!!! your data has too large size.

victor, I'm just curious.... what exactly is the limitation of datatables?