⚠ 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

$this->db is not an object in grocery_crud_model.php



yavor99

yavor99
  • profile picture
  • Member

Posted 28 April 2012 - 06:15 AM

I just installed Grocery CRUD and when i try to open /index.php/main/employees I get.



Fatal error: Call to a member function table_exists() on a non-object in /home/[...]/application/models/grocery_crud_model.php on line 44




My database is perfectly working with the rest of my app. I am autoloading [u]database [/u]library, also [u]grocery_crud_model [/u]model and [u]grocery_crud [/u]config

PHP is 5.3.10
Grocery CRUD is latest version
Codeigniter too.
I started this project a week ago

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 28 April 2012 - 11:28 AM

Don't autoload the grocery_crud_model and grocery_crud_config and it will probably work.

If you want to autoload something just autoload the library.

yavor99

yavor99
  • profile picture
  • Member

Posted 29 April 2012 - 19:50 PM

still the same problem...


___________________________________

[color=#a52a2a]I installed clean CI and Grocery CRUD, then put my old code piece by piece making sure it works after every step. All works now. I still can't provide you with information why the problem occurred but it's solved now. :) Thanks for the interaction anyway :)[/color]

rostamiani

rostamiani
  • profile picture
  • Member

Posted 05 November 2015 - 08:43 AM

I have this problem too. and I DIDN'T AUTOLOAD ANUTHING!