Permalink
Browse files

Merge pull request #371 from billmn/1.3/develop

Fix coding standard and indentation on DBUtil class
  • Loading branch information...
Harro Verton
Harro Verton committed Jun 8, 2012
2 parents 9c5ab61 + 27a2060 commit f182f7173397b164edb2b81617f7b73745677e6e
Showing with 27 additions and 32 deletions.
  1. +27 −32 classes/database/dbutil.html
@@ -283,15 +283,14 @@ <h4 class="method" id="method_table_exists">table_exists($table, $db = null)</h4
<tr>
<th>Example</th>
<td>
- <pre class="php">
- <code>
- // Check if table named 'my_table' exists
- if(\DBUtil::table_exists('my_table')){
- // Table exists
- } else {
- // Table does NOT exist, create it!
- }
- </code>
+ <pre class="php"><code>// Check if table named 'my_table' exists
+if(DBUtil::table_exists('my_table'))
+{
+ // Table exists
+} else
+{
+ // Table does NOT exist, create it!
+}</code>
</pre>
</td>
</tr>
@@ -649,14 +648,15 @@ <h4 class="method" id="method_field_exists">field_exists($table, $columns, $db =
<tr>
<th>Example</th>
<td>
- <pre class="php">
- <code>
- if(\DBUtil::field_exists('my_table', array('my_field_or_column'))){
- // Fields exist
- } else {
- // Fields are not available on the table
- }
- </code>
+ <pre class="php"><code>
+if(DBUtil::field_exists('my_table', array('my_field_or_column')))
+{
+ // Fields exist
+}
+else
+{
+ // Fields are not available on the table
+}</code>
</pre>
</td>
</tr>
@@ -1004,21 +1004,16 @@ <h4 class="method" id="method_add_foregin_key">add_foregin_key($table, $foreign_
<tr>
<th>Example</th>
<td>
- <pre class="php"><code>\DBUtil::add_foreign_key(
- 'users',
- array(
- 'constraint' => 'constraintA',
- 'key' => 'keyA',
- 'reference' => array(
- 'table' => 'table',
- 'column' => 'field',
- ),
- 'on_update' => 'CASCADE',
- 'on_delete' => 'RESTRICT'
- )
- );
-
- </code></pre>
+ <pre class="php"><code>\DBUtil::add_foreign_key('users', array(
+ 'constraint' => 'constraintA',
+ 'key' => 'keyA',
+ 'reference' => array(
+ 'table' => 'table',
+ 'column' => 'field',
+ ),
+ 'on_update' => 'CASCADE',
+ 'on_delete' => 'RESTRICT'
+));</code></pre>
</td>
</tr>
</tbody>

0 comments on commit f182f71

Please sign in to comment.