Connecting to a database |
[eluser]Adam Liszkai[/eluser]
Hi! You must set the database settings in your /application/config/database.php And then load in your class or modell constuct: Code: function __constuct() Or load somwhere (before you use database) in your php code: Code: $this->load->database(); And do not try load in view or template files ![]() And then read the documentation for more: http://ellislab.com/codeigniter/user-gui...index.html Cheers! |
Messages In This Thread |
Connecting to a database - by El Forum - 07-16-2012, 02:49 AM
Connecting to a database - by El Forum - 07-16-2012, 03:09 AM
Connecting to a database - by El Forum - 07-16-2012, 04:08 AM
Connecting to a database - by El Forum - 07-16-2012, 05:17 AM
Connecting to a database - by El Forum - 07-18-2012, 01:30 AM
Connecting to a database - by El Forum - 07-18-2012, 02:05 AM
Connecting to a database - by El Forum - 07-18-2012, 05:36 AM
Connecting to a database - by El Forum - 07-20-2012, 01:10 AM
Connecting to a database - by El Forum - 11-01-2012, 09:13 AM
|