⚠ 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

Can I use gCRUD with bonefire



fake_name_2
  • profile picture
  • Member

Posted 25 May 2012 - 16:10 PM

Any sort of instructions would be great.

duangsin.k
  • profile picture
  • Member

Posted 25 May 2012 - 18:08 PM

Sort by ASC or DESC

fake_name_2
  • profile picture
  • Member

Posted 25 May 2012 - 18:52 PM

Question is


[b] "Can I use gCRUD with bonfire " ?[/b]

fake_name_2
  • profile picture
  • Member

Posted 25 May 2012 - 21:34 PM

[quote name='fake_name_2' timestamp='1337971928' post='1976']
Question is


[b] "Can I use gCRUD with bonfire " ?[/b]
[/quote]

Here is the error I get
[b]Fatal error[/b][color=#000000]: Uncaught exception 'Exception' with message 'The table name does not exist. Please check you database and try again.' in ...\Learning\codeigniter\bf1\bonfire\application\libraries\grocery_crud.php:3748 Stack trace: #0 ...\Learning\codeigniter\bf1\bonfire\application\libraries\grocery_crud.php(3335): grocery_CRUD->get_table() #1 ...\Learning\codeigniter\bf1\bonfire\application\controllers\examples.php(68): grocery_CRUD->render() #2 [internal function]: Examples->employees_management() #3 ...\Learning\codeigniter\bf1\bonfire\codeigniter\core\CodeIgniter.php(332): call_user_func_array(Array, Array) #4 ...\Learning\codeigniter\bf1\index.php(260): require_once('...') #5 {main} thrown in[/color][b]...\Learning\codeigniter\bf1\bonfire\application\libraries\grocery_crud.php[/b][color=#000000] on line [/color][b]3748[/b]

fake_name_2
  • profile picture
  • Member

Posted 25 May 2012 - 21:40 PM

Here is the function that is giving this error

function employees_management()
{
$crud = new grocery_CRUD();

$crud->set_theme('datatables');
$crud->set_table('employees');
$crud->set_relation('officeCode','offices','city');
$crud->display_as('officeCode','Office City');
$crud->set_subject('Employee');

$crud->required_fields('lastName');

$crud->set_field_upload('file_url','assets/uploads/files');

$output = $crud->render();

$this->_example_output($output);
}

"Employee" table is present in DB

fake_name_2
  • profile picture
  • Member

Posted 25 May 2012 - 22:25 PM

Further
$output = $crud->render();
This line is causing problem.

fake_name_2
  • profile picture
  • Member

Posted 26 May 2012 - 14:45 PM

Anyone?

Xrymz
  • profile picture
  • Member

Posted 27 May 2012 - 09:46 AM

[color=#282828][font=helvetica, arial, sans-serif]"Employee" table is present in DB.... bonfire has db_prefix='bf_', try use bf_employee table... or try this code[/font][/color]

[color=#282828][font=helvetica, arial, sans-serif]

function employees_management()
{
$this->db->dbprefix = '';
$crud = new grocery_CRUD();
$crud->set_theme('datatables');
$crud->set_table('employees');
$crud->set_relation('officeCode','offices','city');
$crud->display_as('officeCode','Office City');
$crud->set_subject('Employee');$crud->required_fields('lastName');
$crud->set_field_upload('file_url','assets/uploads/files');$output = $crud->render();
$this->_example_output($output);
}
[/font][/color]

fake_name_2
  • profile picture
  • Member

Posted 28 May 2012 - 20:26 PM

Perfect.
Thanks

marceloabelda
  • profile picture
  • Member

Posted 20 September 2012 - 21:36 PM

I do not work add and edit form, return to list ... (into the form)
someone happened something like this?

Paul Savostin
  • profile picture
  • Member

Posted 15 April 2014 - 00:33 AM

Sort by ASC or DESC

 

:lol: :lol: :lol: