summaryrefslogtreecommitdiffstats
path: root/user_guide/database
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-04 09:59:32 +0200
committeradmin <devnull@localhost>2006-10-04 09:59:32 +0200
commit194b894c33eb812f84862b53691eb5de304455bb (patch)
treecc19c7b67656b0bb0c303b2cc5df88c8c97376d0 /user_guide/database
parentb17cf0d781517d3e76f9ac060e7ba19ab2543116 (diff)
Diffstat (limited to 'user_guide/database')
-rw-r--r--user_guide/database/fields.html16
1 files changed, 8 insertions, 8 deletions
diff --git a/user_guide/database/fields.html b/user_guide/database/fields.html
index 83abe6327..f3ba357d5 100644
--- a/user_guide/database/fields.html
+++ b/user_guide/database/fields.html
@@ -65,14 +65,14 @@ Field Names
<h1>Field Data</h1>
-<h2>$this->db->list_fields();</h2>
+<h2>$this->db->list_fields()</h2>
<p>Returns an array containing the field names. This query can be called two ways:</p>
<p>1. You can supply the table name and call it from the <dfn>$this->db-></dfn> object:</p>
<code>
-$fields = $this->db->list_fields('table_name');<br /><br />
+$fields = $this->db->list_fields('table_name')<br /><br />
foreach ($fields as $field)<br />
{<br />
@@ -84,7 +84,7 @@ foreach ($fields as $field)<br />
from your query result object:</p>
<code>
-$query = $this->db->query('SELECT * FROM some_table');
+$query = $this->db->query('SELECT * FROM some_table')
<br /><br />
foreach ($query->list_fields() as $field)<br />
@@ -94,7 +94,7 @@ foreach ($query->list_fields() as $field)<br />
</code>
-<h2>$this->db->field_exists();</h2>
+<h2>$this->db->field_exists()</h2>
<p>Sometimes it's helpful to know whether a particular field exists befor performing an action.
Returns a boolean TRUE/FALSE. Usage example:</p>
@@ -112,7 +112,7 @@ if ($this->db->field_exists('field_name', 'table_name'))<br />
-<h2>$this->db->field_data();</h2>
+<h2>$this->db->field_data()</h2>
<p>Returns an array of objects containing field information.</p>
<p>Sometimes it's helpful to gather the field names or other metadata, like the column type, max length, etc.</p>
@@ -122,7 +122,7 @@ if ($this->db->field_exists('field_name', 'table_name'))<br />
<p>Usage example:</p>
<code>
-$fields = $this->db->field_data('table_name');<br /><br />
+$fields = $this->db->field_data('table_name')<br /><br />
foreach ($fields as $field)<br />
{<br />
@@ -136,8 +136,8 @@ foreach ($fields as $field)<br />
<p>If you have run a query already you can use the result oject instead of supplying the table name:</p>
<code>
-$query = $this->db->query("YOUR QUERY");<br />
-$fields = $query->field_data();
+$query = $this->db->query("YOUR QUERY")<br />
+$fields = $query->field_data()
</code>