File tree Expand file tree Collapse file tree 3 files changed +30
-4
lines changed
user_guide_src/source/database Expand file tree Collapse file tree 3 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 1
- #########
2
- Utilities
3
- #########
1
+ ######################
2
+ Database Utility Class
3
+ ######################
4
4
5
5
The Database Utility Class contains methods that help you manage your database.
6
6
7
7
.. contents ::
8
8
:local:
9
9
:depth: 2
10
10
11
+ ******************************
12
+ Initializing the Utility Class
13
+ ******************************
14
+
15
+ Load the Utility Class as follows:
16
+
17
+ .. literalinclude :: utilities/002.php
18
+ :lines: 2-
19
+
20
+ You can also pass another database group to the DB Utility loader, in case
21
+ the database you want to manage isn't the default one:
22
+
23
+ .. literalinclude :: utilities/003.php
24
+ :lines: 2-
25
+
26
+ In the above example, we're passing a database group name as the first
27
+ parameter.
28
+
29
+ ****************************
30
+ Using the Database Utilities
31
+ ****************************
11
32
12
33
Export a Query Result as an XML Document
13
34
========================================
@@ -30,4 +51,3 @@ and it will get the following xml result when the ``mytable`` has columns ``id``
30
51
.. important :: This method will NOT write the XML file for you. It
31
52
simply creates the XML layout. If you need to write the file
32
53
use the :php:func: `write_file() ` helper.
33
-
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ dbutil = \CodeIgniter \Database \Config::utils ();
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ $ dbutil = \CodeIgniter \Database \Config::utils ('group_name ' );
You can’t perform that action at this time.
0 commit comments