From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001 From: Razican Date: Mon, 25 Apr 2011 17:26:45 +0200 Subject: Fixed double-space typo. --- user_guide/database/forge.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'user_guide/database/forge.html') 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.

                                          ),
                );

-

After the fields have been defined, they can be added using $this->dbforge->add_field($fields); followed by a call to the create_table() function.

+

After the fields have been defined, they can be added using $this->dbforge->add_field($fields); followed by a call to the create_table() function.

$this->dbforge->add_field()

The add fields function will accept the above array.

Passing strings as fields

@@ -164,7 +164,7 @@ already be running, since the forge class relies on it.

// gives id INT(9) NOT NULL AUTO_INCREMENT

Adding Keys

Generally speaking, you'll want your table to have Keys. This is accomplished with $this->dbforge->add_key('field'). An optional second parameter set to TRUE will make it a primary key. Note that add_key() must be followed by a call to create_table().

-

Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.

+

Multiple column non-primary keys must be sent as an array. Sample output below is for MySQL.

$this->dbforge->add_key('blog_id', TRUE);
// gives PRIMARY KEY `blog_id` (`blog_id`)

@@ -187,7 +187,7 @@ already be running, since the forge class relies on it.

Dropping a table

Executes a DROP TABLE sql

$this->dbforge->drop_table('table_name');
- // gives DROP TABLE IF EXISTS table_name

+ // gives DROP TABLE IF EXISTS table_name

Renaming a table

Executes a TABLE rename

$this->dbforge->rename_table('old_table_name', 'new_table_name');
@@ -200,7 +200,7 @@ already be running, since the forge class relies on it.

);
$this->dbforge->add_column('table_name', $fields);

-// gives ALTER TABLE table_name ADD preferences TEXT

+// gives ALTER TABLE table_name ADD preferences TEXT

$this->dbforge->drop_column()

Used to remove a column from a table.

$this->dbforge->drop_column('table_name', 'column_to_drop');

@@ -214,7 +214,7 @@ $this->dbforge->add_column('table_name', $fields);
);
$this->dbforge->modify_column('table_name', $fields);

- // gives ALTER TABLE table_name CHANGE old_name new_name TEXT

+ // gives ALTER TABLE table_name CHANGE old_name new_name TEXT

 

-- cgit v1.2.3-24-g4f1b