Derek Jones | 8ede1a2 | 2011-10-05 13:34:52 -0500 | [diff] [blame] | 1 | ########## |
| 2 | Table Data |
| 3 | ########## |
| 4 | |
| 5 | These functions let you fetch table information. |
| 6 | |
| 7 | $this->db->list_tables(); |
| 8 | ========================== |
| 9 | |
| 10 | Returns an array containing the names of all the tables in the database |
| 11 | you are currently connected to. Example:: |
| 12 | |
| 13 | $tables = $this->db->list_tables(); foreach ($tables as $table) { echo $table; } |
| 14 | |
| 15 | $this->db->table_exists(); |
| 16 | =========================== |
| 17 | |
| 18 | Sometimes it's helpful to know whether a particular table exists before |
| 19 | running an operation on it. Returns a boolean TRUE/FALSE. Usage example:: |
| 20 | |
| 21 | if ($this->db->table_exists('table_name')) { // some code... } |
| 22 | |
| 23 | Note: Replace *table_name* with the name of the table you are looking |
| 24 | for. |