diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-10-04 18:24:10 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-10-04 18:24:10 +0200 |
commit | 12a1747148175f9cfeb01f99ede42d5039f667e5 (patch) | |
tree | 4ddbfbb8871c0ab02674da66086b20da8377e247 /user_guide/database | |
parent | 8706a5dd93d7740c30660727b99b554e00b0565b (diff) | |
parent | 3fdb613ee7c1968435edb81dcb9a59f42be6de6e (diff) |
Merge pull request #282 from timw4mail/develop
PDO driver for Database class.
Diffstat (limited to 'user_guide/database')
-rw-r--r-- | user_guide/database/connecting.html | 2 | ||||
-rw-r--r-- | user_guide/database/helpers.html | 4 |
2 files changed, 4 insertions, 2 deletions
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(<samp>$config</samp>);</code> <p>For information on each of these values please see the <a href="configuration.html">configuration page</a>.</p> +<p class="important"><strong>Note:</strong> For the PDO driver, $config['hostname'] should look like this: 'mysql:host=localhost'</p> + <p>Or you can submit your database values as a Data Source Name. DSNs must have this prototype:</p> <code>$dsn = 'dbdriver://username:password@hostname/database';<br /> diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html index 6a8aba55b..be6c339b4 100644 --- a/user_guide/database/helpers.html +++ b/user_guide/database/helpers.html @@ -64,11 +64,11 @@ Query Helpers <h2>$this->db->insert_id()</h2> <p>The insert ID number when performing database inserts.</p> +<p class="important"><strong>Note:</strong> If using the PDO driver with PostgreSQL, this function requires a $name parameter, which specifies the appropriate sequence to check for the insert id.</p> <h2>$this->db->affected_rows()</h2> <p>Displays the number of affected rows, when doing "write" type queries (insert, update, etc.).</p> -<p>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.</p> +<p>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.</p> <h2>$this->db->count_all();</h2> |