From e334c472fb4be44feec3a73402fc4a2b062cbfc0 Mon Sep 17 00:00:00 2001 From: admin Date: Sat, 21 Oct 2006 19:44:22 +0000 Subject: --- user_guide/database/connecting.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'user_guide/database/connecting.html') diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html index c057f69fe..ced947941 100644 --- a/user_guide/database/connecting.html +++ b/user_guide/database/connecting.html @@ -12,7 +12,7 @@ @@ -69,20 +69,20 @@ Connecting

Automatically Connecting

-

The "auto connect" feature will load and instantiate the database class with every page load. +

The "auto connect" feature will load and instantiate the database class with every page load. To enable "auto connecting", add the word database to the core array, as indicated in the following file:

application/config/autoload.php

Manually Connecting

-

If only some of your pages require database connectivity you can manually connect to your database by adding this -line of code in any function where it is needed, or in your class constructor to make the database +

If only some of your pages require database connectivity you can manually connect to your database by adding this +line of code in any function where it is needed, or in your class constructor to make the database available globally in that class.

$this->load->database(); -

If the above function does not contain any information in the first parameter it will connect +

If the above function does not contain any information in the first parameter it will connect to the group specified in your database config file. For most people, this is the preferred method of use.

@@ -133,7 +133,7 @@ $this->load->database('$dsn'); $DB2 = $this->load->database('group_two', TRUE); -

Note: Change the words "group_one" and "group_two" to the specific group names you are connecting to (or +

Note: Change the words "group_one" and "group_two" to the specific group names you are connecting to (or you can pass the connection values as indicated above).

By setting the second parameter to TRUE (boolean) the function will return the database object.

-- cgit v1.2.3-24-g4f1b