File tree Expand file tree Collapse file tree
user_guide_src/source/database Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,17 +56,26 @@ fetchable results.
5656Working with Database Prefixes Manually
5757***************************************
5858
59+ $db->prefixTable()
60+ ==================
61+
5962If you have configured a database prefix and would like to prepend it to
6063a table name for use in a native SQL query for example, then you can use
6164the following:
6265
6366.. literalinclude :: queries/004.php
6467
68+ $db->setPrefix()
69+ ================
70+
6571If for any reason you would like to change the prefix programmatically
6672without needing to create a new connection you can use this method:
6773
6874.. literalinclude :: queries/005.php
6975
76+ $db->getPrefix()
77+ ================
78+
7079You can get the current prefix any time with this method:
7180
7281.. literalinclude :: queries/006.php
@@ -75,6 +84,9 @@ You can get the current prefix any time with this method:
7584Protecting Identifiers
7685**********************
7786
87+ $db->protectIdentifiers()
88+ =========================
89+
7890In many databases, it is advisable to protect table and field names - for
7991example with backticks in MySQL. **Query Builder queries are
8092automatically protected **, but if you need to manually protect an
You can’t perform that action at this time.
0 commit comments