• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
connecting and retrieving database data

#1
[eluser]Unknown[/eluser]
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:

<?

#2
[eluser]Ajaxian64[/eluser]
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');

#3
[eluser]mddd[/eluser]
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.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.