Welcome Guest, Not a member yet? Register   Sign In
connecting and retrieving database data

hey everyone.i still can't get through in connecting and retrieving data from my database.
1)in my database.php config file,i configured the db name,username set to root and active group allowed as default (for now).
2)in the welcome.php controller file i loaded the db with:$this->load->database('default');
3)finally in my view page where i wish to display the db data,i typed:


try $this->load->database(); in your controller; You should do it in constructor, after parent::Controller();
Otherwise you can do this in autoload $autoload['libraries'] = array('database','xxx');

Topic starter has continued here

@ndijones: Don't start multiple threads on the same issue please. That makes it hard for people to help you.

Theme © iAndrew 2016 - Forum software by © MyBB