diff options
Diffstat (limited to 'user_guide/database/forge.html')
-rw-r--r-- | user_guide/database/forge.html | 8 |
1 files changed, 4 insertions, 4 deletions
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 "UNSIGNED" in the field definition</li>
<li>default/value : to generate a default value in the field definition</li>
<li>null/true : to generate "NULL" in the field definition. Without this, the field will default to "NOT NULL"</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 />
'blog_id' => array(<br />
@@ -148,7 +148,7 @@ already be running, since the forge class relies on it.</p> 'type' => 'TEXT',<br />
'null' => TRUE,<br />
),<br />
- );<br />
+ )<br />
);</code></p>
<p>After the fields have been defined, they can be added using <dfn>$this->dbforge->add_field($fields);</dfn> followed by a call to the <dfn>create_table()</dfn> function.</p>
<h3>$this->dbforge->add_field()</h3>
@@ -187,12 +187,12 @@ already be running, since the forge class relies on it.</p> );<br />
$this->dbforge->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->dbforge->drop_column()</h2>
<p>Used to remove a column from a table. </p>
<p><code>$this->dbforge->drop_column('table_name', 'column_to_drop');</code></p>
<h2>$this->dbforge->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 "name" 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 "name" key into the field defining array.</p>
<p><code>$fields = array(<br />
'old_name' => array(<br />
'name' => 'new_name',<br />
|