diff options
author | admin <devnull@localhost> | 2006-09-24 19:58:27 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-09-24 19:58:27 +0200 |
commit | 5808346898ec9c602893fc54540958a8c556be29 (patch) | |
tree | 2262ca12979e40dcd5cec8be5314b391571feb1d | |
parent | 9659273ba7de6b73c3f188a174e526e692071f43 (diff) |
-rw-r--r-- | system/drivers/DB_active_record.php | 2 | ||||
-rw-r--r-- | system/drivers/DB_driver.php | 8 | ||||
-rw-r--r-- | system/libraries/Controller.php | 6 | ||||
-rw-r--r-- | user_guide/general/changelog.html | 14 | ||||
-rw-r--r-- | user_guide/general/models.html | 4 | ||||
-rw-r--r-- | user_guide/general/scaffolding.html | 2 | ||||
-rw-r--r-- | user_guide/general/security.html | 2 | ||||
-rw-r--r-- | user_guide/libraries/database/helpers.html | 15 | ||||
-rw-r--r-- | user_guide/libraries/database/results.html | 27 | ||||
-rw-r--r-- | user_guide/scripts/nav.js | 2 |
10 files changed, 45 insertions, 37 deletions
diff --git a/system/drivers/DB_active_record.php b/system/drivers/DB_active_record.php index af12d9d27..c038185bc 100644 --- a/system/drivers/DB_active_record.php +++ b/system/drivers/DB_active_record.php @@ -24,7 +24,7 @@ * @subpackage Drivers * @category Database * @author Rick Ellis - * @link http://www.codeigniter.com/user_guide/libraries/database/ + * @link http://www.codeigniter.com/user_guide/database/ */ class CI_DB_active_record extends CI_DB_driver { diff --git a/system/drivers/DB_driver.php b/system/drivers/DB_driver.php index a1ec14b06..48f7c4a9a 100644 --- a/system/drivers/DB_driver.php +++ b/system/drivers/DB_driver.php @@ -26,7 +26,7 @@ * @subpackage Drivers * @category Database * @author Rick Ellis - * @link http://www.codeigniter.com/user_guide/libraries/database/ + * @link http://www.codeigniter.com/user_guide/database/ */ class CI_DB_driver { @@ -625,7 +625,7 @@ class CI_DB_driver { } return $this->_field_data($this->dbprefix.$table); - } + } // -------------------------------------------------------------------- @@ -806,7 +806,7 @@ class CI_DB_driver { if ( ! class_exists('CI_Exceptions')) { - include_once(BASEPATH.'libraries/Exceptions.php'); + include_once(BASEPATH.'libraries/Exceptions'.EXT); } $error = new CI_Exceptions(); @@ -827,7 +827,7 @@ class CI_DB_driver { * * @category Database * @author Rick Ellis - * @link http://www.codeigniter.com/user_guide/libraries/database/ + * @link http://www.codeigniter.com/user_guide/database/ */ class CI_DB_result { diff --git a/system/libraries/Controller.php b/system/libraries/Controller.php index 0dd6ee6a4..5be10500b 100644 --- a/system/libraries/Controller.php +++ b/system/libraries/Controller.php @@ -362,11 +362,11 @@ class Controller extends CI_Base { $params['active_r'] = TRUE; } - require_once(BASEPATH.'drivers/DB_driver'.EXT); + require_once(BASEPATH.'database/DB_driver'.EXT); if ( ! isset($params['active_r']) OR $params['active_r'] == TRUE) { - require_once(BASEPATH.'drivers/DB_active_record'.EXT); + require_once(BASEPATH.'database/DB_active_record'.EXT); if ( ! class_exists('CI_DB')) { @@ -381,7 +381,7 @@ class Controller extends CI_Base { } } - require_once(BASEPATH.'drivers/DB_'.$params['dbdriver'].EXT); + require_once(BASEPATH.'database/drivers/'.$params['dbdriver'].'/'.$params['dbdriver'].EXT); // Instantiate the DB adapter $driver = 'CI_DB_'. $params['dbdriver']; diff --git a/user_guide/general/changelog.html b/user_guide/general/changelog.html index 7aa778962..b0a46b4f1 100644 --- a/user_guide/general/changelog.html +++ b/user_guide/general/changelog.html @@ -106,7 +106,7 @@ Change Log <li>Added support for % character in URL.</li>
<li>Added the ability to supply full URLs using the <a href="../helpers/url_helper.html">anchor()</a> helper function.</li>
<li>Added mode parameter to <a href="../helpers/file_helper.html">file_write()</a> helper.</li>
-<li>Added support for changing the port number in the <a href="../libraries/database/configuration.html">Postgre driver</a>.</li>
+<li>Added support for changing the port number in the <a href="../database/configuration.html">Postgre driver</a>.</li>
<li>Moved the list of "allowed URI characters" out of the Router class and into the config file.</li>
<li>Moved the MIME type array out of the Upload class and into its own file in the applications/config/ folder.</li>
<li>Updated the Upload class to allow the upload field name to be set when calling <a href="../libraries/file_uploading.html".>do_upload()</a>.</li>
@@ -193,10 +193,10 @@ Change Log <li>Added the ability to pass objects to the <strong>insert()</strong> and <strong>update()</strong> database functions.
This feature enables you to (among other things) use your <a href="../general/models.html">Model class</a> variables to run queries with. See the Models page for details.</li>
<li>Added the ability to pass objects to the <a href="../general/views.html">view loading function</a>: $this->load->view('my_view', <var>$object</var>);</li>
-<li>Added <kbd>getwhere</kbd> function to <a href="../libraries/database/active_record.html">Active Record class</a>.</li>
-<li>Added <kbd>count_all</kbd> function to <a href="../libraries/database/active_record.html">Active Record class</a>.</li>
+<li>Added <kbd>getwhere</kbd> function to <a href="../database/active_record.html">Active Record class</a>.</li>
+<li>Added <kbd>count_all</kbd> function to <a href="../database/active_record.html">Active Record class</a>.</li>
<li>Added language file for scaffolding and fixed a scaffolding bug that occurs when there are no rows in the specified table.</li>
-<li>Added <a href="../libraries/database/queries.html">$this->db->last_query()</a>, which allows you to view your last query that was run.</li>
+<li>Added <a href="../database/queries.html">$this->db->last_query()</a>, which allows you to view your last query that was run.</li>
<li>Added a new mime type to the upload class for better compatibility.</li>
<li>Changed how cache files are read to prevent PHP errors if the cache file contains an XML tag, which PHP wants to interpret as a short tag.</li>
<li>Fixed a bug in a couple of the active record functions (where and orderby).</li>
@@ -213,8 +213,8 @@ This feature enables you to (among other things) use your <a href="../general/m <ul>
<li>Added support for <a href="models.html">Models</a>.</li>
<li>Redesigned the database libraries to support additional RDBMs (Postgre, MySQLi, etc.).</li>
-<li>Redesigned the <a href="../libraries/database/active_record.html">Active Record class</a> to enable more varied types of queries with simpler syntax, and advanced features like JOINs.</li>
-<li>Added a feature to the database class that lets you run <a href="../libraries/database/call_function.html">custom function calls</a>.</li>
+<li>Redesigned the <a href="../database/active_record.html">Active Record class</a> to enable more varied types of queries with simpler syntax, and advanced features like JOINs.</li>
+<li>Added a feature to the database class that lets you run <a href="../database/call_function.html">custom function calls</a>.</li>
<li>Added support for <a href="controllers.html">private functions</a> in your controllers. Any controller function name that starts with an underscore will not be served by a URI request.</li>
<li>Added the ability to pass your own initialization parameters to your <a href="creating_libraries.html">custom core libraries</a> when using $this->load->library()</li>
<li>Added support for running standard <a href="urls.html">query string URLs</a>. These can be optionally enabled in your config file.</li>
@@ -226,7 +226,7 @@ This feature enables you to (among other things) use your <a href="../general/m <li>Added better class and function name-spacing to avoid collisions with user developed classes. All Code Igniter classes are now prefixed with <dfn>CI_</dfn> and
all controller methods are prefixed with <dfn>_ci</dfn> to avoid controller collisions. A list of reserved function names can be <a href="controllers.html">found here</a>.</li>
<li>Redesigned how the "CI" super object is referenced, depending on whether PHP 4 or 5 is being run, since PHP 5 allows a more graceful way to manage objects that utilizes a bit less resources.</li>
-<li>Deprecated: <var>$this->db->use_table()</var> has been deprecated. Please read the <a href="../libraries/database/active_record.html">Active Record</a> page for information.</li>
+<li>Deprecated: <var>$this->db->use_table()</var> has been deprecated. Please read the <a href="../database/active_record.html">Active Record</a> page for information.</li>
<li>Deprecated: <var>$this->db->smart_escape_str()</var> has been deprecated. Please use this instead: <var>$this->db->escape()</var></li>
<li>Fixed a bug in the exception handler which was preventing some PHP errors from showing up.</li>
<li>Fixed a typo in the URI class. $this->total_segment() should be plural: $this->total_segments()</li>
diff --git a/user_guide/general/models.html b/user_guide/general/models.html index 26b85f67b..71f68bd5c 100644 --- a/user_guide/general/models.html +++ b/user_guide/general/models.html @@ -122,7 +122,7 @@ class Blogmodel extends Model {<br /> <br />
}</code>
-<p>Note: The functions in the above example use the <a href="../libraries/database/active_record.html">Active Record</a> database functions.</p>
+<p>Note: The functions in the above example use the <a href="../database/active_record.html">Active Record</a> database functions.</p>
<a name="anatomy"></a>
@@ -207,7 +207,7 @@ class Blog_controller extends Controller {<br /> <p>When a model is loaded it does <strong>NOT</strong> connect automatically to your database. The following options for connecting are available to you:</p>
<ul>
-<li>You can connect using the standard database methods <a href="../libraries/database/connecting.html">described here</a>, either from within your Controller class or your Model class.</li>
+<li>You can connect using the standard database methods <a href="../database/connecting.html">described here</a>, either from within your Controller class or your Model class.</li>
<li>You can tell the model loading function to auto-connect by passing <kbd>TRUE</kbd> (boolean) via the third parameter,
and connectivity settings, as defined in your database config file will be used:
diff --git a/user_guide/general/scaffolding.html b/user_guide/general/scaffolding.html index 80a7c9868..d3408f42b 100644 --- a/user_guide/general/scaffolding.html +++ b/user_guide/general/scaffolding.html @@ -95,7 +95,7 @@ will launch the scaffolding interface, so please pick something obscure that no <h2>Enabling Scaffolding</h2>
<p>Note: The information on this page assumes you already know how <a href="controllers.html">controllers</a> work, and that you have
-a working one available. It also assumes you have configured Code Igniter to auto-connect to your <a href="../libraries/database/index.html">database</a>.
+a working one available. It also assumes you have configured Code Igniter to auto-connect to your <a href="../database/index.html">database</a>.
If not, the information here won't be very relevant, so you are encouraged to go through those sections first.
Lastly, it assumes you understand what a class constructor is. If not, read the last section of the <a href="controllers.html">controllers</a>
page.</p>
diff --git a/user_guide/general/security.html b/user_guide/general/security.html index f6e276898..f94f02e23 100644 --- a/user_guide/general/security.html +++ b/user_guide/general/security.html @@ -131,7 +131,7 @@ your data.</p> <li><h2>Escape all data before database insertion</h2>
<p>Never insert information into your database without escaping it. Please see the section that discusses
-<a href="../libraries/database/queries.html">queries</a> for more information.</p>
+<a href="../database/queries.html">queries</a> for more information.</p>
</li>
diff --git a/user_guide/libraries/database/helpers.html b/user_guide/libraries/database/helpers.html index dd05aef4c..0d299c023 100644 --- a/user_guide/libraries/database/helpers.html +++ b/user_guide/libraries/database/helpers.html @@ -67,21 +67,6 @@ Query Helpers <h1>Query Helper Functions</h1>
-<h2>$query->num_rows()</h2>
-<p>The number of rows returned by the query. Note: In this example, <dfn>$query</dfn> is the variable that the query result object is assigned to:</p>
-
-<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
-echo $query->num_rows();
-</code>
-
-<h2>$query->num_fields()</h2>
-<p>The number of FIELDS returned by the query. Make sure to call the function using your query result object:</p>
-
-<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
-echo $query->num_fields();
-</code>
-
-
<h2>$this->db->insert_id()</h2>
<p>The insert ID number when performing database inserts.</p>
diff --git a/user_guide/libraries/database/results.html b/user_guide/libraries/database/results.html index 342e7e4b4..b1952db5a 100644 --- a/user_guide/libraries/database/results.html +++ b/user_guide/libraries/database/results.html @@ -100,7 +100,7 @@ Query Results }<br />
}
</code>
-
+
<h2>result_array()</h2>
<p>This function returns the query result as a pure array, or FALSE on failure. Typically you'll use this in a foreach loop, like this:</p>
@@ -114,6 +114,10 @@ Query Results echo $row['body'];<br />
}</code>
+ <h2>result('array')</h2>
+
+ <p>Identical to <dfn>$this->db->result_array()</dfn>.</p>
+
<h2>row()</h2>
@@ -180,6 +184,25 @@ Query Results +<h1><br />Result Helper Functions</h1>
+
+
+<h2>$query->num_rows()</h2>
+<p>The number of rows returned by the query. Note: In this example, <dfn>$query</dfn> is the variable that the query result object is assigned to:</p>
+
+<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
+echo $query->num_rows();
+</code>
+
+<h2>$query->num_fields()</h2>
+<p>The number of FIELDS (columns) returned by the query. Make sure to call the function using your query result object:</p>
+
+<code>$query = $this->db->query('SELECT * FROM my_table');<br /><br />
+echo $query->num_fields();
+</code>
+
+
+
</div>
@@ -192,7 +215,7 @@ Previous Topic: <a href="queries.html">Queries</a> ·
<a href="#top">Top of Page</a> ·
<a href="../../index.html">User Guide Home</a> ·
-Next Topic: <a href="active_record.html">Active Record Pattern</a>
+Next Topic: <a href="helpers.html">Query Helper Functions</a>
<p>
<p><a href="http://www.codeigniter.com">Code Igniter</a> · Copyright © 2006 · <a href="http://www.pmachine.com">pMachine, Inc.</a></p>
</div>
diff --git a/user_guide/scripts/nav.js b/user_guide/scripts/nav.js index 960a6a8b2..acc64eefd 100644 --- a/user_guide/scripts/nav.js +++ b/user_guide/scripts/nav.js @@ -65,7 +65,7 @@ function create_menu(basepath) '<li><a href="'+base+'libraries/benchmark.html">Benchmarking Class</a></li>' + '<li><a href="'+base+'libraries/calendar.html">Calendaring Class</a></li>' + '<li><a href="'+base+'libraries/config.html">Config Class</a></li>' + - '<li><a href="'+base+'libraries/database/index.html">Database Class</a></li>' + + '<li><a href="'+base+'database/index.html">Database Class</a></li>' + '<li><a href="'+base+'libraries/email.html">Email Class</a></li>' + '<li><a href="'+base+'libraries/encryption.html">Encryption Class</a></li>' + '<li><a href="'+base+'libraries/file_uploading.html">File Uploading Class</a></li>' + |