From b2a9ceccdb85050cb494e6d0a98b0a49495d29bb Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 1 Oct 2006 03:38:04 +0000 Subject: --- user_guide/database/fields.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'user_guide/database/fields.html') diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html index 260cd222f..83abe6327 100644 --- a/user_guide/database/fields.html +++ b/user_guide/database/fields.html @@ -94,6 +94,23 @@ foreach ($query->list_fields() as $field)
+

$this->db->field_exists();

+ +

Sometimes it's helpful to know whether a particular field exists befor performing an action. +Returns a boolean TRUE/FALSE. Usage example:

+ + +if ($this->db->field_exists('field_name', 'table_name'))
+{
+   // some code...
+} +
+ +

Note: Replace field_name with the name of the column you are looking for, and replace +table_name with the name of the table you are looking for.

+ + +

$this->db->field_data();

Returns an array of objects containing field information.

-- cgit v1.2.3-24-g4f1b