@@ -283,15 +283,14 @@ <h4 class="method" id="method_table_exists">table_exists($table, $db = null)</h4
283283 < tr >
284284 < th > Example</ th >
285285 < td >
286- < pre class ="php ">
287- < code >
288- // Check if table named 'my_table' exists
289- if(\DBUtil::table_exists('my_table')){
290- // Table exists
291- } else {
292- // Table does NOT exist, create it!
293- }
294- </ code >
286+ < pre class ="php "> < code > // Check if table named 'my_table' exists
287+ if(DBUtil::table_exists('my_table'))
288+ {
289+ // Table exists
290+ } else
291+ {
292+ // Table does NOT exist, create it!
293+ }</ code >
295294 </ pre >
296295 </ td >
297296 </ tr >
@@ -649,14 +648,15 @@ <h4 class="method" id="method_field_exists">field_exists($table, $columns, $db =
649648 < tr >
650649 < th > Example</ th >
651650 < td >
652- < pre class ="php ">
653- < code >
654- if(\DBUtil::field_exists('my_table', array('my_field_or_column'))){
655- // Fields exist
656- } else {
657- // Fields are not available on the table
658- }
659- </ code >
651+ < pre class ="php "> < code >
652+ if(DBUtil::field_exists('my_table', array('my_field_or_column')))
653+ {
654+ // Fields exist
655+ }
656+ else
657+ {
658+ // Fields are not available on the table
659+ }</ code >
660660 </ pre >
661661 </ td >
662662 </ tr >
@@ -1004,21 +1004,16 @@ <h4 class="method" id="method_add_foregin_key">add_foregin_key($table, $foreign_
10041004 < tr >
10051005 < th > Example</ th >
10061006 < td >
1007- < pre class ="php "> < code > \DBUtil::add_foreign_key(
1008- 'users',
1009- array(
1010- 'constraint' => 'constraintA',
1011- 'key' => 'keyA',
1012- 'reference' => array(
1013- 'table' => 'table',
1014- 'column' => 'field',
1015- ),
1016- 'on_update' => 'CASCADE',
1017- 'on_delete' => 'RESTRICT'
1018- )
1019- );
1020-
1021- </ code > </ pre >
1007+ < pre class ="php "> < code > \DBUtil::add_foreign_key('users', array(
1008+ 'constraint' => 'constraintA',
1009+ 'key' => 'keyA',
1010+ 'reference' => array(
1011+ 'table' => 'table',
1012+ 'column' => 'field',
1013+ ),
1014+ 'on_update' => 'CASCADE',
1015+ 'on_delete' => 'RESTRICT'
1016+ ));</ code > </ pre >
10221017 </ td >
10231018 </ tr >
10241019 </ tbody >
0 commit comments