PHP Classes


Recommend this page to a friend!

      DConnect  >  All threads  >  DConnect  >  (Un) Subscribe thread alerts  
Summary:DConnect functionality
Author:João Mário Nedeff
Date:2012-11-26 12:41:39

  1. DConnect   Reply   Report abuse  
João Mário Nedeff - 2012-11-26 12:41:39
This class implements a standard way to connect to a database.

Its objective is to get the project organized, providing an easy method to retrieve a connection to the database.

<strong>$conn = DBConnect::Connect(); // Thats it - you have your connection!</strong>

It relies on the Configs class. This one, reads information from the <strong>core.ini</strong> file, which is placed in the <strong>/project/configs</strong> folder.

So, if you have many projects, it really is a relief to automatically know where are the connections paramenters.

Once they are set on the INI file, you never have to worry about them again. Through a single call for a <strong>static method</strong> you get your connection!