Jump to content

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

table_exists() db error $this-db

  • Please log in to reply
3 replies to this topic

#1 yavor99



  • Members
  • Pip
  • 2 posts

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 database library, also grocery_crud_model model and grocery_crud config

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

Edited by yavor99, 28 April 2012 - 06:17 AM.

#2 web-johnny


    grocery CRUD Author

  • Administrators
  • 1,144 posts
  • LocationLondon

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.
Posted Image

#3 yavor99



  • Members
  • Pip
  • 2 posts

Posted 29 April 2012 - 07:50 PM

still the same problem...


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 :)

Edited by yavor99, 29 April 2012 - 09:04 PM.

#4 rostamiani



  • Members
  • PipPip
  • 13 posts

Posted 05 November 2015 - 08:43 AM

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

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users