From 9d9fe16060a3db6293df93eadfae965d790022c2 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 14 Sep 2011 11:03:32 -0400 Subject: Added connection information note in documentation --- user_guide/database/connecting.html | 2 ++ 1 file changed, 2 insertions(+) (limited to 'user_guide/database') diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html index 309f2bc1a..b18088132 100644 --- a/user_guide/database/connecting.html +++ b/user_guide/database/connecting.html @@ -121,6 +121,8 @@ $this->load->database($config);

For information on each of these values please see the configuration page.

+

Note: For the PDO driver, $config['hostname'] should look like this: 'mysql:host=localhost'

+

Or you can submit your database values as a Data Source Name. DSNs must have this prototype:

$dsn = 'dbdriver://username:password@hostname/database';
-- cgit v1.2.3-24-g4f1b From 51a4888c71287e66d21c9749c13ba895953b9acb Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 14 Sep 2011 13:47:06 -0400 Subject: Fixed affected_rows() function, added PDO/postgres note for insert_id() function --- user_guide/database/helpers.html | 1 + 1 file changed, 1 insertion(+) (limited to 'user_guide/database') diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index 6a8aba55b..ecd0d84b6 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -64,6 +64,7 @@ Query Helpers

$this->db->insert_id()

The insert ID number when performing database inserts.

+

Note: If using the PDO driver with PostgreSQL, this function requires a $name parameter, which specifies the appropriate sequence to check for the insert id.

$this->db->affected_rows()

Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).

-- cgit v1.2.3-24-g4f1b From 57cea51f89a1da6f15d2e9e22dbd5f071b7bb286 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 14 Sep 2011 14:26:28 -0400 Subject: Miscellaneous fixes --- user_guide/database/helpers.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'user_guide/database') diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index ecd0d84b6..be6c339b4 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -68,8 +68,7 @@ Query Helpers

$this->db->affected_rows()

Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).

-

Note: In MySQL "DELETE FROM TABLE" returns 0 affected rows. The database class has a small hack that allows it to return the -correct number of affected rows. By default this hack is enabled but it can be turned off in the database driver file.

+

Note: In MySQL "DELETE FROM TABLE" returns 0 affected rows. The database class has a small hack that allows it to return the correct number of affected rows. By default this hack is enabled but it can be turned off in the database driver file.

$this->db->count_all();

-- cgit v1.2.3-24-g4f1b