summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/database')
-rw-r--r--user_guide_src/source/database/forge.rst8
-rw-r--r--user_guide_src/source/database/utilities.rst8
2 files changed, 9 insertions, 7 deletions
diff --git a/user_guide_src/source/database/forge.rst b/user_guide_src/source/database/forge.rst
index 89fac023e..646e3a56e 100644
--- a/user_guide_src/source/database/forge.rst
+++ b/user_guide_src/source/database/forge.rst
@@ -143,13 +143,15 @@ string into the field definitions with add_field()
$this->dbforge->add_field("label varchar(100) NOT NULL DEFAULT 'default label'");
+.. note:: Passing raw strings as fields cannot be followed by ``add_key()`` calls on those fields.
+
.. note:: Multiple calls to add_field() are cumulative.
Creating an id field
--------------------
There is a special exception for creating id fields. A field with type
-id will automatically be assinged as an INT(9) auto_incrementing
+id will automatically be assigned as an INT(9) auto_incrementing
Primary Key.
::
@@ -227,7 +229,7 @@ Execute a DROP TABLE statement and optionally add an IF EXISTS clause.
$this->dbforge->drop_table('table_name');
// Produces: DROP TABLE IF EXISTS table_name
- $this->dbforge->drop_table('table_name');
+ $this->dbforge->drop_table('table_name',TRUE);
Renaming a table
@@ -405,4 +407,4 @@ Class Reference
:returns: TRUE on success, FALSE on failure
:rtype: bool
- Renames a table. Usage: See `Renaming a table`_. \ No newline at end of file
+ Renames a table. Usage: See `Renaming a table`_.
diff --git a/user_guide_src/source/database/utilities.rst b/user_guide_src/source/database/utilities.rst
index cc4aeb018..2fa5239c8 100644
--- a/user_guide_src/source/database/utilities.rst
+++ b/user_guide_src/source/database/utilities.rst
@@ -18,7 +18,7 @@ Initializing the Utility Class
Load the Utility Class as follows::
- $this->load->dbutil()
+ $this->load->dbutil();
You can also pass another database object to the DB Utility loader, in case
the database you want to manage isn't the default one::
@@ -35,7 +35,7 @@ assigning it directly to ``$this->dbutil``.
Once initialized you will access the methods using the ``$this->dbutil``
object::
- $this->dbutil->some_method()
+ $this->dbutil->some_method();
****************************
Using the Database Utilities
@@ -180,7 +180,7 @@ backup data can be compressed in either Zip or Gzip format.
.. note:: For Interbase/Firebird databases, the backup file name is the only parameter.
- Eg. $this->dbutil->backup('db_backup_filename');
+ $this->dbutil->backup('db_backup_filename');
.. note:: Due to the limited execution time and memory available to PHP,
backing up very large databases may not be possible. If your database is
@@ -197,7 +197,7 @@ Usage Example
$this->load->dbutil();
// Backup your entire database and assign it to a variable
- $backup =& $this->dbutil->backup();
+ $backup = $this->dbutil->backup();
// Load the file helper and write the file to your server
$this->load->helper('file');