Welcome Guest, Not a member yet? Register   Sign In
"You have specified an invalid database connection group."
#1

[eluser]zulubanslee[/eluser]
I have the correct database connectivity info, I have loaded the database through the controller constructor (since it appears you cannot autoload it any more)

$this->load->database('databaseName');

Still getting this message.
#2

[eluser]InsiteFX[/eluser]
Did you set the application/config/database.php up for another database besides the default?

InsiteFX
#3

[eluser]zulubanslee[/eluser]
Nope, it is the default.
#4

[eluser]InsiteFX[/eluser]
Then is should be like this
Code:
$this->load->database('group_name');

$this->load->database('config');

InsiteFX
#5

[eluser]zulubanslee[/eluser]
Here is my code. Let me know if I've got something wrong.
Code:
class Addabookcontroller extends CI_Controller
     {        
         function __construct()
         {
             parent::__construct();
            
            
            $this->load->database('group_name');
            $this->load->database('config');
            $this->load->helper('url');
            $this->load->helper('form');
         }
    
        function index()
        {                    
            
            $data['menu']                     = $this->load->view('menu_view', '', TRUE);
            $data['admin_sidebar']     = $this->load->view('admin/admin_sidebar_view', '', TRUE);
            $data['footer']                 = $this->load->view('footer_view', '', TRUE);    
            $data['genres']                    = $this->db->get('genre');            
            
            $this->load->view('admin/add_a_book_view', $data);            
        }
#6

[eluser]zulubanslee[/eluser]
I think I figured it out. I was doing this:

$this->load->database('dbName');

I should have done this:

$this->load->database();


I haven't verified yet.




Theme © iAndrew 2016 - Forum software by © MyBB