summaryrefslogtreecommitdiffstats
path: root/user_guide
diff options
context:
space:
mode:
authorDerek Allard <derek.allard@ellislab.com>2008-03-25 23:27:37 +0100
committerDerek Allard <derek.allard@ellislab.com>2008-03-25 23:27:37 +0100
commit44bd10fa25c980737e7f2a731aefb46095b1f569 (patch)
treec52bd761085ff712b34f60e6225123153253a262 /user_guide
parent8597ca78541b49526da50ca5a2f2ca8bcdba9f8f (diff)
userguide note, corrections and omissions
Diffstat (limited to 'user_guide')
-rw-r--r--user_guide/database/active_record.html2
-rw-r--r--user_guide/database/connecting.html2
-rw-r--r--user_guide/database/forge.html8
-rw-r--r--user_guide/database/helpers.html4
4 files changed, 8 insertions, 8 deletions
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index d2c888ceb..533d52dc1 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -397,7 +397,7 @@ $this-&gt;db-&gt;or_not_like('body', 'match'); <br />
<h2> $this-&gt;db-&gt;distinct();<br />
</h2>
-<p>Adds the &quot;DISTINCT&quot; keyword to to a query</p>
+<p>Adds the &quot;DISTINCT&quot; keyword to a query</p>
<p><code>$this-&gt;db-&gt;distinct();<br />
$this-&gt;db-&gt;get('table');<br />
<br />
diff --git a/user_guide/database/connecting.html b/user_guide/database/connecting.html
index 6cdd109d6..79277e536 100644
--- a/user_guide/database/connecting.html
+++ b/user_guide/database/connecting.html
@@ -65,7 +65,7 @@ Connecting
<h2>Automatically Connecting</h2>
<p>The "auto connect" feature will load and instantiate the database class with every page load.
-To enable "auto connecting", add the word <var>database</var> to the core array, as indicated in the following file:</p>
+To enable "auto connecting", add the word <var>database</var> to the library array, as indicated in the following file:</p>
<p><kbd>application/config/autoload.php</kbd></p>
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html
index cfbe005a0..4b0588c6c 100644
--- a/user_guide/database/forge.html
+++ b/user_guide/database/forge.html
@@ -126,7 +126,7 @@ already be running, since the forge class relies on it.</p>
<li>unsigned/true : to generate &quot;UNSIGNED&quot; in the field definition</li>
<li>default/value : to generate a default value in the field definition</li>
<li>null/true : to generate &quot;NULL&quot; in the field definition. Without this, the field will default to &quot;NOT NULL&quot;</li>
- <li>auto_increment/true : generates an auto_increment flag on the field. Note that the field type must </li>
+ <li>auto_increment/true : generates an auto_increment flag on the field. Note that the field type must integer</li>
</ul>
<p><code>$fields = array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'blog_id' =&gt; array(<br />
@@ -148,7 +148,7 @@ already be running, since the forge class relies on it.</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'type' =&gt; 'TEXT',<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'null' =&gt; TRUE,<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;),<br />
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br />
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;)<br />
);</code></p>
<p>After the fields have been defined, they can be added using <dfn>$this-&gt;dbforge-&gt;add_field($fields);</dfn> followed by a call to the <dfn>create_table()</dfn> function.</p>
<h3>$this-&gt;dbforge-&gt;add_field()</h3>
@@ -187,12 +187,12 @@ already be running, since the forge class relies on it.</p>
);<br />
$this-&gt;dbforge-&gt;add_column('table_name', $fields);<br />
<br />
-// gives ALTER TABLE sites ADD preferences TEXT</code></p>
+// gives ALTER TABLE table_name ADD preferences TEXT</code></p>
<h2>$this-&gt;dbforge-&gt;drop_column()</h2>
<p>Used to remove a column from a table. </p>
<p><code>$this-&gt;dbforge-&gt;drop_column('table_name', 'column_to_drop');</code></p>
<h2>$this-&gt;dbforge-&gt;modify_column()</h2>
-<p>The usage of this function is identical to add_coumn(), except it alters an existing column rather than adding a new one. In order to use it you must add a &quot;name&quot; key into the field defining array.</p>
+<p>The usage of this function is identical to add_column(), except it alters an existing column rather than adding a new one. In order to use it you must add a &quot;name&quot; key into the field defining array.</p>
<p><code>$fields = array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'old_name' =&gt; array(<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'name' =&gt; 'new_name',<br />
diff --git a/user_guide/database/helpers.html b/user_guide/database/helpers.html
index 409660e2a..b3dab62d7 100644
--- a/user_guide/database/helpers.html
+++ b/user_guide/database/helpers.html
@@ -126,8 +126,8 @@ $where = "author_id = 1 AND status = 'active'";
$str = $this->db->update_string('table_name', $data, $where);
</code>
-<p>The first parameter is the table name, the second is an associative array with the data to be inserted, and the third parameter is the "where" clause. The above example produces:</p>
-<code> UPDATE exp_weblog SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active'</code>
+<p>The first parameter is the table name, the second is an associative array with the data to be updated, and the third parameter is the "where" clause. The above example produces:</p>
+<code> UPDATE table_name SET name = 'Rick', email = 'rick@your-site.com', url = 'www.your-site.com' WHERE author_id = 1 AND status = 'active'</code>
<p class="important">Note: Values are automatically escaped, producing safer queries.</p>