diff options
author | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:47:47 +0200 |
---|---|---|
committer | Greg Aker <greg.aker@ellislab.com> | 2011-04-27 08:47:47 +0200 |
commit | a6507905578f1cf209776ae3d53099a005a06823 (patch) | |
tree | 9f23bb557f920034cf65c86059c84e37efd34d79 /user_guide/database/forge.html | |
parent | 60ef4ea72e169e174ff8dbb421609a178a3c0c48 (diff) | |
parent | 25d495b4a2598f771a858108a2cd2e96f0130412 (diff) |
merging in changes
Diffstat (limited to 'user_guide/database/forge.html')
-rw-r--r-- | user_guide/database/forge.html | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/user_guide/database/forge.html b/user_guide/database/forge.html index cad2cf26f..bbef053e4 100644 --- a/user_guide/database/forge.html +++ b/user_guide/database/forge.html @@ -151,7 +151,7 @@ already be running, since the forge class relies on it.</p> ),<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> +<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> <p>The add fields function will accept the above array.</p> <h3>Passing strings as fields</h3> @@ -164,7 +164,7 @@ already be running, since the forge class relies on it.</p> // gives id INT(9) NOT NULL AUTO_INCREMENT</code></p> <h2><a name="add_key" id="add_key"></a>Adding Keys</h2> <p>Generally speaking, you'll want your table to have Keys. This is accomplished with <dfn>$this->dbforge->add_key('field')</dfn>. An optional second parameter set to TRUE will make it a primary key. Note that <dfn>add_key()</dfn> must be followed by a call to <dfn>create_table()</dfn>.</p> -<p>Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.</p> +<p>Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.</p> <p><code>$this->dbforge->add_key('blog_id', TRUE);<br /> // gives PRIMARY KEY `blog_id` (`blog_id`)<br /> <br /> @@ -187,7 +187,7 @@ already be running, since the forge class relies on it.</p> <h2><a name="drop_table" id="drop_table"></a>Dropping a table</h2> <p>Executes a DROP TABLE sql</p> <p><code>$this->dbforge->drop_table('table_name');<br /> - // gives DROP TABLE IF EXISTS table_name</code></p> + // gives DROP TABLE IF EXISTS table_name</code></p> <h2><a name="rename_table" id="rename_table"></a>Renaming a table</h2> <p>Executes a TABLE rename</p> <p><code>$this->dbforge->rename_table('old_table_name', 'new_table_name');<br /> @@ -200,7 +200,7 @@ already be running, since the forge class relies on it.</p> );<br /> $this->dbforge->add_column('table_name', $fields);<br /> <br /> -// gives ALTER TABLE table_name 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> @@ -214,7 +214,7 @@ $this->dbforge->add_column('table_name', $fields);<br /> );<br /> $this->dbforge->modify_column('table_name', $fields);<br /> <br /> - // gives ALTER TABLE table_name CHANGE old_name new_name TEXT </code></p> + // gives ALTER TABLE table_name CHANGE old_name new_name TEXT </code></p> <p> </p> </div> <!-- END CONTENT --> |