summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/database/table_data.rst
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2011-10-05 20:34:52 +0200
committerDerek Jones <derek.jones@ellislab.com>2011-10-05 20:34:52 +0200
commit8ede1a2ecbb62577afd32996956c5feaf7ddf9b6 (patch)
tree2e960ec3b416b477f40bb546371f2d486f4a22f0 /user_guide_src/source/database/table_data.rst
parentd1ecd5cd4ae6ab5d37df9fbda14b93977b9e743c (diff)
replacing the old HTML user guide with a Sphinx-managed user guide
Diffstat (limited to 'user_guide_src/source/database/table_data.rst')
-rw-r--r--user_guide_src/source/database/table_data.rst24
1 files changed, 24 insertions, 0 deletions
diff --git a/user_guide_src/source/database/table_data.rst b/user_guide_src/source/database/table_data.rst
new file mode 100644
index 000000000..ec7dbbf6c
--- /dev/null
+++ b/user_guide_src/source/database/table_data.rst
@@ -0,0 +1,24 @@
+##########
+Table Data
+##########
+
+These functions let you fetch table information.
+
+$this->db->list_tables();
+==========================
+
+Returns an array containing the names of all the tables in the database
+you are currently connected to. Example::
+
+ $tables = $this->db->list_tables(); foreach ($tables as $table) {    echo $table; }
+
+$this->db->table_exists();
+===========================
+
+Sometimes it's helpful to know whether a particular table exists before
+running an operation on it. Returns a boolean TRUE/FALSE. Usage example::
+
+ if ($this->db->table_exists('table_name')) {    // some code... }
+
+Note: Replace *table_name* with the name of the table you are looking
+for.