From fb28bb8d3bb01993e83126be028a1dda43422a39 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 24 Sep 2006 17:59:33 +0000 Subject: Adding database folder --- user_guide/database/table_data.html | 116 ++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) create mode 100644 user_guide/database/table_data.html (limited to 'user_guide/database/table_data.html') diff --git a/user_guide/database/table_data.html b/user_guide/database/table_data.html new file mode 100644 index 000000000..6b6658c93 --- /dev/null +++ b/user_guide/database/table_data.html @@ -0,0 +1,116 @@ + + + + +Code Igniter User Guide + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +

Code Igniter User Guide Version 1.4.1

+
+ + + + + + + + + +
+ + + +
+ + + +
+ +

Table Data

+ +

These functions let you fetch table information.

+ +

$this->db->tables();

+ +

Returns an array containing the names of all the tables in the database you are currently connected to. Example:

+ +$tables = $this->db->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.

+ + + + + +
+ + + + + + + \ No newline at end of file -- cgit v1.2.3-24-g4f1b