• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Newb Q: Database Auto-Connect when calling a model

#1
[eluser]Unknown[/eluser]
Here is a quote from /user_guide/general/models.html#what
(the page describing Models)

----You can tell the model loading function to auto-connect by passing TRUE (boolean) via the third parameter, and connectivity settings, as defined in your database config file will be used----

My question is, for MySQL, what config file are they talking about? When I code without a framework -- I know, total loser Smile -- I would make something like mysqlconnect.php that just has a simple function to connect to the db and select a table. If the above quote is talking about something like this, where do I find out how to write this code and get CI to know it exists? Or is the quote refering to some config file that was installed when the database software was?

This is my first post (besides my intro) so I appreciate all feedback. Don't worry, you won't hurt my feelings. I am a humble learner (or aspiring to be, anyway).

Lata,
Jerry

#2
[eluser]Randy Casburn[/eluser]
Welcome Jerry,

All the config files are stored in the config directory under the system/application folder.

So the database.php file in that directory is the config file in question. You can find out about that file in the same documentation under the Database Class heading.

Randy


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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