Alright so this is my last try. I am working on an application for my softwware enginnering class. Its due really soon so I might have to scrap it and write a simple crud.
I have installed and re-installed codeigniter, same with groccerycrud. I follow this tutorial exactly.
My index() method works. (which just echos a message to make sure everything is working)
Then when I call employees(), I get this error:
[size=2][b]Fatal error[/b]: Uncaught exception 'Exception' with message 'The table name does not exist. Please check you database and try again.' in /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/application/libraries/grocery_crud.php:4349 Stack trace: #0 /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/application/libraries/grocery_crud.php(3875): grocery_CRUD->get_table() #1 /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/application/libraries/grocery_crud.php(3891): grocery_CRUD->pre_render() #2 /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/application/controllers/main.php(28): grocery_CRUD->render() #3 [internal function]: Main->employees() #4 /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/system/core/CodeIgniter.php(359): call_user_func_array(Array, Array) #5 /home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/index.php(202): require_once('/home/tcampbell...') #6 {main} thrown in [b]/home/tcampbell011/tylerlcampbell.com/CodeIgniter_2.1.3/application/libraries/grocery_crud.php[/b] on line [b]4349[/b][/size]
I know the table does exist, I'm attaching a screen shot of phpmyadmin, I just copied the sql from the tutorial.
At first I tried with the default files that come with CI and GC. Then I noticed datatables.php and flexgrid.php are missing. I downloaded those 2 files from a previous version I found on google. Still no luck.
I've also tried playing with my database settings, but if the index method works it should be connected.
If anyone could help me it sure would save me a lot of time on a project due tuesday. I would appericate it!
trouble installing using tutorial - 3rd try
Started by tlc, 02 December 2012 - 19:43 PM
- Single Page
Posted 02 December 2012 - 19:43 PM
Posted 05 December 2012 - 08:14 AM
Hello [member='tlc'] and welcome to the forums,
actually I think you can't connect to the database properly. Can you please try this before you try grocery CRUD? Can you just print_r a simple query like this?
I think there is a problem with your connection. If you have problems with this query. Try this:
and check what tables exists to the database.
I guess that probably you have problem that you point a different database. Make sure that you are connected to the right host. In your case it seems that your host is _____________.com and not localhost as I can see from the image.
Cheers
Johnny
actually I think you can't connect to the database properly. Can you please try this before you try grocery CRUD? Can you just print_r a simple query like this?
$result = $this->db->get('employees')->result();
echo "<pre>";
print_r($result);
die();
I think there is a problem with your connection. If you have problems with this query. Try this:
$this->db->list_tables();
and check what tables exists to the database.
I guess that probably you have problem that you point a different database. Make sure that you are connected to the right host. In your case it seems that your host is _____________.com and not localhost as I can see from the image.
Cheers
Johnny