@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public function __construct() |
100 | 100 | { |
101 | - $this->config =& load_class('Config', 'core'); |
|
101 | + $this->config = & load_class('Config', 'core'); |
|
102 | 102 | |
103 | 103 | // If query strings are enabled, we don't need to parse any segments. |
104 | 104 | // However, they don't make sense under CLI. |
@@ -558,11 +558,11 @@ discard block |
||
558 | 558 | |
559 | 559 | if ($where === 'trailing') |
560 | 560 | { |
561 | - $leading = ''; |
|
561 | + $leading = ''; |
|
562 | 562 | } |
563 | 563 | elseif ($where === 'leading') |
564 | 564 | { |
565 | - $trailing = ''; |
|
565 | + $trailing = ''; |
|
566 | 566 | } |
567 | 567 | |
568 | 568 | return $leading.$this->$which($n).$trailing; |
@@ -74,8 +74,8 @@ discard block |
||
74 | 74 | public function __construct(&$db) |
75 | 75 | { |
76 | 76 | // Assign the main CI object to $this->CI and load the file helper since we use it a lot |
77 | - $this->CI =& get_instance(); |
|
78 | - $this->db =& $db; |
|
77 | + $this->CI = & get_instance(); |
|
78 | + $this->db = & $db; |
|
79 | 79 | $this->CI->load->helper('file'); |
80 | 80 | |
81 | 81 | $this->check_path(); |
@@ -194,7 +194,7 @@ discard block |
||
194 | 194 | { |
195 | 195 | if ($segment_one === '') |
196 | 196 | { |
197 | - $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); |
|
197 | + $segment_one = ($this->CI->uri->segment(1) == FALSE) ? 'default' : $this->CI->uri->segment(1); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | if ($segment_two === '') |
@@ -92,7 +92,7 @@ discard block |
||
92 | 92 | * |
93 | 93 | * @var string |
94 | 94 | */ |
95 | - public $dbdriver = 'mysqli'; |
|
95 | + public $dbdriver = 'mysqli'; |
|
96 | 96 | |
97 | 97 | /** |
98 | 98 | * Sub-driver |
@@ -107,63 +107,63 @@ discard block |
||
107 | 107 | * |
108 | 108 | * @var string |
109 | 109 | */ |
110 | - public $dbprefix = ''; |
|
110 | + public $dbprefix = ''; |
|
111 | 111 | |
112 | 112 | /** |
113 | 113 | * Character set |
114 | 114 | * |
115 | 115 | * @var string |
116 | 116 | */ |
117 | - public $char_set = 'utf8'; |
|
117 | + public $char_set = 'utf8'; |
|
118 | 118 | |
119 | 119 | /** |
120 | 120 | * Collation |
121 | 121 | * |
122 | 122 | * @var string |
123 | 123 | */ |
124 | - public $dbcollat = 'utf8_general_ci'; |
|
124 | + public $dbcollat = 'utf8_general_ci'; |
|
125 | 125 | |
126 | 126 | /** |
127 | 127 | * Encryption flag/data |
128 | 128 | * |
129 | 129 | * @var mixed |
130 | 130 | */ |
131 | - public $encrypt = FALSE; |
|
131 | + public $encrypt = FALSE; |
|
132 | 132 | |
133 | 133 | /** |
134 | 134 | * Swap Prefix |
135 | 135 | * |
136 | 136 | * @var string |
137 | 137 | */ |
138 | - public $swap_pre = ''; |
|
138 | + public $swap_pre = ''; |
|
139 | 139 | |
140 | 140 | /** |
141 | 141 | * Database port |
142 | 142 | * |
143 | 143 | * @var int |
144 | 144 | */ |
145 | - public $port = ''; |
|
145 | + public $port = ''; |
|
146 | 146 | |
147 | 147 | /** |
148 | 148 | * Persistent connection flag |
149 | 149 | * |
150 | 150 | * @var bool |
151 | 151 | */ |
152 | - public $pconnect = FALSE; |
|
152 | + public $pconnect = FALSE; |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Connection ID |
156 | 156 | * |
157 | 157 | * @var object|resource |
158 | 158 | */ |
159 | - public $conn_id = FALSE; |
|
159 | + public $conn_id = FALSE; |
|
160 | 160 | |
161 | 161 | /** |
162 | 162 | * Result ID |
163 | 163 | * |
164 | 164 | * @var object|resource |
165 | 165 | */ |
166 | - public $result_id = FALSE; |
|
166 | + public $result_id = FALSE; |
|
167 | 167 | |
168 | 168 | /** |
169 | 169 | * Debug flag |
@@ -172,21 +172,21 @@ discard block |
||
172 | 172 | * |
173 | 173 | * @var bool |
174 | 174 | */ |
175 | - public $db_debug = FALSE; |
|
175 | + public $db_debug = FALSE; |
|
176 | 176 | |
177 | 177 | /** |
178 | 178 | * Benchmark time |
179 | 179 | * |
180 | 180 | * @var int |
181 | 181 | */ |
182 | - public $benchmark = 0; |
|
182 | + public $benchmark = 0; |
|
183 | 183 | |
184 | 184 | /** |
185 | 185 | * Executed queries count |
186 | 186 | * |
187 | 187 | * @var int |
188 | 188 | */ |
189 | - public $query_count = 0; |
|
189 | + public $query_count = 0; |
|
190 | 190 | |
191 | 191 | /** |
192 | 192 | * Bind marker |
@@ -195,7 +195,7 @@ discard block |
||
195 | 195 | * |
196 | 196 | * @var string |
197 | 197 | */ |
198 | - public $bind_marker = '?'; |
|
198 | + public $bind_marker = '?'; |
|
199 | 199 | |
200 | 200 | /** |
201 | 201 | * Save queries flag |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | * |
205 | 205 | * @var bool |
206 | 206 | */ |
207 | - public $save_queries = TRUE; |
|
207 | + public $save_queries = TRUE; |
|
208 | 208 | |
209 | 209 | /** |
210 | 210 | * Queries list |
@@ -212,7 +212,7 @@ discard block |
||
212 | 212 | * @see CI_DB_driver::$save_queries |
213 | 213 | * @var string[] |
214 | 214 | */ |
215 | - public $queries = array(); |
|
215 | + public $queries = array(); |
|
216 | 216 | |
217 | 217 | /** |
218 | 218 | * Query times |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | * |
222 | 222 | * @var array |
223 | 223 | */ |
224 | - public $query_times = array(); |
|
224 | + public $query_times = array(); |
|
225 | 225 | |
226 | 226 | /** |
227 | 227 | * Data cache |
@@ -230,28 +230,28 @@ discard block |
||
230 | 230 | * |
231 | 231 | * @var array |
232 | 232 | */ |
233 | - public $data_cache = array(); |
|
233 | + public $data_cache = array(); |
|
234 | 234 | |
235 | 235 | /** |
236 | 236 | * Transaction enabled flag |
237 | 237 | * |
238 | 238 | * @var bool |
239 | 239 | */ |
240 | - public $trans_enabled = TRUE; |
|
240 | + public $trans_enabled = TRUE; |
|
241 | 241 | |
242 | 242 | /** |
243 | 243 | * Strict transaction mode flag |
244 | 244 | * |
245 | 245 | * @var bool |
246 | 246 | */ |
247 | - public $trans_strict = TRUE; |
|
247 | + public $trans_strict = TRUE; |
|
248 | 248 | |
249 | 249 | /** |
250 | 250 | * Transaction depth level |
251 | 251 | * |
252 | 252 | * @var int |
253 | 253 | */ |
254 | - protected $_trans_depth = 0; |
|
254 | + protected $_trans_depth = 0; |
|
255 | 255 | |
256 | 256 | /** |
257 | 257 | * Transaction status flag |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | * |
261 | 261 | * @var bool |
262 | 262 | */ |
263 | - protected $_trans_status = TRUE; |
|
263 | + protected $_trans_status = TRUE; |
|
264 | 264 | |
265 | 265 | /** |
266 | 266 | * Transaction failure flag |
@@ -269,28 +269,28 @@ discard block |
||
269 | 269 | * |
270 | 270 | * @var bool |
271 | 271 | */ |
272 | - protected $_trans_failure = FALSE; |
|
272 | + protected $_trans_failure = FALSE; |
|
273 | 273 | |
274 | 274 | /** |
275 | 275 | * Cache On flag |
276 | 276 | * |
277 | 277 | * @var bool |
278 | 278 | */ |
279 | - public $cache_on = FALSE; |
|
279 | + public $cache_on = FALSE; |
|
280 | 280 | |
281 | 281 | /** |
282 | 282 | * Cache directory path |
283 | 283 | * |
284 | 284 | * @var bool |
285 | 285 | */ |
286 | - public $cachedir = ''; |
|
286 | + public $cachedir = ''; |
|
287 | 287 | |
288 | 288 | /** |
289 | 289 | * Cache auto-delete flag |
290 | 290 | * |
291 | 291 | * @var bool |
292 | 292 | */ |
293 | - public $cache_autodel = FALSE; |
|
293 | + public $cache_autodel = FALSE; |
|
294 | 294 | |
295 | 295 | /** |
296 | 296 | * DB Cache object |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | * |
306 | 306 | * @var bool |
307 | 307 | */ |
308 | - protected $_protect_identifiers = TRUE; |
|
308 | + protected $_protect_identifiers = TRUE; |
|
309 | 309 | |
310 | 310 | /** |
311 | 311 | * List of reserved identifiers |
@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | * |
315 | 315 | * @var string[] |
316 | 316 | */ |
317 | - protected $_reserved_identifiers = array('*'); |
|
317 | + protected $_reserved_identifiers = array('*'); |
|
318 | 318 | |
319 | 319 | /** |
320 | 320 | * Identifier escape character |
@@ -711,8 +711,8 @@ discard block |
||
711 | 711 | } |
712 | 712 | |
713 | 713 | // Load and instantiate the result driver |
714 | - $driver = $this->load_rdriver(); |
|
715 | - $RES = new $driver($this); |
|
714 | + $driver = $this->load_rdriver(); |
|
715 | + $RES = new $driver($this); |
|
716 | 716 | |
717 | 717 | // Is query caching enabled? If so, we'll serialize the |
718 | 718 | // result object and save it to a cache file. |
@@ -725,13 +725,13 @@ discard block |
||
725 | 725 | // result object, so we'll have to compile the data |
726 | 726 | // and save it) |
727 | 727 | $CR = new CI_DB_result($this); |
728 | - $CR->result_object = $RES->result_object(); |
|
729 | - $CR->result_array = $RES->result_array(); |
|
730 | - $CR->num_rows = $RES->num_rows(); |
|
728 | + $CR->result_object = $RES->result_object(); |
|
729 | + $CR->result_array = $RES->result_array(); |
|
730 | + $CR->num_rows = $RES->num_rows(); |
|
731 | 731 | |
732 | 732 | // Reset these since cached objects can not utilize resource IDs. |
733 | - $CR->conn_id = NULL; |
|
734 | - $CR->result_id = NULL; |
|
733 | + $CR->conn_id = NULL; |
|
734 | + $CR->result_id = NULL; |
|
735 | 735 | |
736 | 736 | $this->CACHE->write($sql, $CR); |
737 | 737 | } |
@@ -1553,17 +1553,17 @@ discard block |
||
1553 | 1553 | ? '\s+'.preg_quote(trim(sprintf($this->_like_escape_str, $this->_like_escape_chr)), '/') |
1554 | 1554 | : ''; |
1555 | 1555 | $_operators = array( |
1556 | - '\s*(?:<|>|!)?=\s*', // =, <=, >=, != |
|
1557 | - '\s*<>?\s*', // <, <> |
|
1558 | - '\s*>\s*', // > |
|
1559 | - '\s+IS NULL', // IS NULL |
|
1560 | - '\s+IS NOT NULL', // IS NOT NULL |
|
1561 | - '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) |
|
1562 | - '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) |
|
1563 | - '\s+BETWEEN\s+', // BETWEEN value AND value |
|
1564 | - '\s+IN\s*\([^\)]+\)', // IN(list) |
|
1565 | - '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) |
|
1566 | - '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] |
|
1556 | + '\s*(?:<|>|!)?=\s*', // =, <=, >=, != |
|
1557 | + '\s*<>?\s*', // <, <> |
|
1558 | + '\s*>\s*', // > |
|
1559 | + '\s+IS NULL', // IS NULL |
|
1560 | + '\s+IS NOT NULL', // IS NOT NULL |
|
1561 | + '\s+EXISTS\s*\([^\)]+\)', // EXISTS(sql) |
|
1562 | + '\s+NOT EXISTS\s*\([^\)]+\)', // NOT EXISTS(sql) |
|
1563 | + '\s+BETWEEN\s+', // BETWEEN value AND value |
|
1564 | + '\s+IN\s*\([^\)]+\)', // IN(list) |
|
1565 | + '\s+NOT IN\s*\([^\)]+\)', // NOT IN (list) |
|
1566 | + '\s+LIKE\s+\S.*('.$_les.')?', // LIKE 'expr'[ ESCAPE '%s'] |
|
1567 | 1567 | '\s+NOT LIKE\s+\S.*('.$_les.')?' // NOT LIKE 'expr'[ ESCAPE '%s'] |
1568 | 1568 | ); |
1569 | 1569 | |
@@ -1731,7 +1731,7 @@ discard block |
||
1731 | 1731 | */ |
1732 | 1732 | public function display_error($error = '', $swap = '', $native = FALSE) |
1733 | 1733 | { |
1734 | - $LANG =& load_class('Lang', 'core'); |
|
1734 | + $LANG = & load_class('Lang', 'core'); |
|
1735 | 1735 | $LANG->load('db'); |
1736 | 1736 | |
1737 | 1737 | $heading = $LANG->line('db_error_heading'); |
@@ -1769,7 +1769,7 @@ discard block |
||
1769 | 1769 | } |
1770 | 1770 | } |
1771 | 1771 | |
1772 | - $error =& load_class('Exceptions', 'core'); |
|
1772 | + $error = & load_class('Exceptions', 'core'); |
|
1773 | 1773 | echo $error->show_error($heading, $message, 'error_db'); |
1774 | 1774 | exit(8); // EXIT_DATABASE |
1775 | 1775 | } |
@@ -58,28 +58,28 @@ discard block |
||
58 | 58 | * |
59 | 59 | * @var array |
60 | 60 | */ |
61 | - public $fields = array(); |
|
61 | + public $fields = array(); |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * Keys data |
65 | 65 | * |
66 | 66 | * @var array |
67 | 67 | */ |
68 | - public $keys = array(); |
|
68 | + public $keys = array(); |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * Primary Keys data |
72 | 72 | * |
73 | 73 | * @var array |
74 | 74 | */ |
75 | - public $primary_keys = array(); |
|
75 | + public $primary_keys = array(); |
|
76 | 76 | |
77 | 77 | /** |
78 | 78 | * Database character set |
79 | 79 | * |
80 | 80 | * @var string |
81 | 81 | */ |
82 | - public $db_char_set = ''; |
|
82 | + public $db_char_set = ''; |
|
83 | 83 | |
84 | 84 | // -------------------------------------------------------------------- |
85 | 85 | |
@@ -88,28 +88,28 @@ discard block |
||
88 | 88 | * |
89 | 89 | * @var string |
90 | 90 | */ |
91 | - protected $_create_database = 'CREATE DATABASE %s'; |
|
91 | + protected $_create_database = 'CREATE DATABASE %s'; |
|
92 | 92 | |
93 | 93 | /** |
94 | 94 | * DROP DATABASE statement |
95 | 95 | * |
96 | 96 | * @var string |
97 | 97 | */ |
98 | - protected $_drop_database = 'DROP DATABASE %s'; |
|
98 | + protected $_drop_database = 'DROP DATABASE %s'; |
|
99 | 99 | |
100 | 100 | /** |
101 | 101 | * CREATE TABLE statement |
102 | 102 | * |
103 | 103 | * @var string |
104 | 104 | */ |
105 | - protected $_create_table = "%s %s (%s\n)"; |
|
105 | + protected $_create_table = "%s %s (%s\n)"; |
|
106 | 106 | |
107 | 107 | /** |
108 | 108 | * CREATE TABLE IF statement |
109 | 109 | * |
110 | 110 | * @var string |
111 | 111 | */ |
112 | - protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; |
|
112 | + protected $_create_table_if = 'CREATE TABLE IF NOT EXISTS'; |
|
113 | 113 | |
114 | 114 | /** |
115 | 115 | * CREATE TABLE keys flag |
@@ -119,42 +119,42 @@ discard block |
||
119 | 119 | * |
120 | 120 | * @var bool |
121 | 121 | */ |
122 | - protected $_create_table_keys = FALSE; |
|
122 | + protected $_create_table_keys = FALSE; |
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * DROP TABLE IF EXISTS statement |
126 | 126 | * |
127 | 127 | * @var string |
128 | 128 | */ |
129 | - protected $_drop_table_if = 'DROP TABLE IF EXISTS'; |
|
129 | + protected $_drop_table_if = 'DROP TABLE IF EXISTS'; |
|
130 | 130 | |
131 | 131 | /** |
132 | 132 | * RENAME TABLE statement |
133 | 133 | * |
134 | 134 | * @var string |
135 | 135 | */ |
136 | - protected $_rename_table = 'ALTER TABLE %s RENAME TO %s;'; |
|
136 | + protected $_rename_table = 'ALTER TABLE %s RENAME TO %s;'; |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * UNSIGNED support |
140 | 140 | * |
141 | 141 | * @var bool|array |
142 | 142 | */ |
143 | - protected $_unsigned = TRUE; |
|
143 | + protected $_unsigned = TRUE; |
|
144 | 144 | |
145 | 145 | /** |
146 | 146 | * NULL value representation in CREATE/ALTER TABLE statements |
147 | 147 | * |
148 | 148 | * @var string |
149 | 149 | */ |
150 | - protected $_null = ''; |
|
150 | + protected $_null = ''; |
|
151 | 151 | |
152 | 152 | /** |
153 | 153 | * DEFAULT value representation in CREATE/ALTER TABLE statements |
154 | 154 | * |
155 | 155 | * @var string |
156 | 156 | */ |
157 | - protected $_default = ' DEFAULT '; |
|
157 | + protected $_default = ' DEFAULT '; |
|
158 | 158 | |
159 | 159 | // -------------------------------------------------------------------- |
160 | 160 | |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | */ |
167 | 167 | public function __construct(&$db) |
168 | 168 | { |
169 | - $this->db =& $db; |
|
169 | + $this->db = & $db; |
|
170 | 170 | log_message('info', 'Database Forge Class Initialized'); |
171 | 171 | } |
172 | 172 |
@@ -56,119 +56,119 @@ discard block |
||
56 | 56 | * |
57 | 57 | * @var bool |
58 | 58 | */ |
59 | - protected $return_delete_sql = FALSE; |
|
59 | + protected $return_delete_sql = FALSE; |
|
60 | 60 | |
61 | 61 | /** |
62 | 62 | * Reset DELETE data flag |
63 | 63 | * |
64 | 64 | * @var bool |
65 | 65 | */ |
66 | - protected $reset_delete_data = FALSE; |
|
66 | + protected $reset_delete_data = FALSE; |
|
67 | 67 | |
68 | 68 | /** |
69 | 69 | * QB SELECT data |
70 | 70 | * |
71 | 71 | * @var array |
72 | 72 | */ |
73 | - protected $qb_select = array(); |
|
73 | + protected $qb_select = array(); |
|
74 | 74 | |
75 | 75 | /** |
76 | 76 | * QB DISTINCT flag |
77 | 77 | * |
78 | 78 | * @var bool |
79 | 79 | */ |
80 | - protected $qb_distinct = FALSE; |
|
80 | + protected $qb_distinct = FALSE; |
|
81 | 81 | |
82 | 82 | /** |
83 | 83 | * QB FROM data |
84 | 84 | * |
85 | 85 | * @var array |
86 | 86 | */ |
87 | - protected $qb_from = array(); |
|
87 | + protected $qb_from = array(); |
|
88 | 88 | |
89 | 89 | /** |
90 | 90 | * QB JOIN data |
91 | 91 | * |
92 | 92 | * @var array |
93 | 93 | */ |
94 | - protected $qb_join = array(); |
|
94 | + protected $qb_join = array(); |
|
95 | 95 | |
96 | 96 | /** |
97 | 97 | * QB WHERE data |
98 | 98 | * |
99 | 99 | * @var array |
100 | 100 | */ |
101 | - protected $qb_where = array(); |
|
101 | + protected $qb_where = array(); |
|
102 | 102 | |
103 | 103 | /** |
104 | 104 | * QB GROUP BY data |
105 | 105 | * |
106 | 106 | * @var array |
107 | 107 | */ |
108 | - protected $qb_groupby = array(); |
|
108 | + protected $qb_groupby = array(); |
|
109 | 109 | |
110 | 110 | /** |
111 | 111 | * QB HAVING data |
112 | 112 | * |
113 | 113 | * @var array |
114 | 114 | */ |
115 | - protected $qb_having = array(); |
|
115 | + protected $qb_having = array(); |
|
116 | 116 | |
117 | 117 | /** |
118 | 118 | * QB keys |
119 | 119 | * |
120 | 120 | * @var array |
121 | 121 | */ |
122 | - protected $qb_keys = array(); |
|
122 | + protected $qb_keys = array(); |
|
123 | 123 | |
124 | 124 | /** |
125 | 125 | * QB LIMIT data |
126 | 126 | * |
127 | 127 | * @var int |
128 | 128 | */ |
129 | - protected $qb_limit = FALSE; |
|
129 | + protected $qb_limit = FALSE; |
|
130 | 130 | |
131 | 131 | /** |
132 | 132 | * QB OFFSET data |
133 | 133 | * |
134 | 134 | * @var int |
135 | 135 | */ |
136 | - protected $qb_offset = FALSE; |
|
136 | + protected $qb_offset = FALSE; |
|
137 | 137 | |
138 | 138 | /** |
139 | 139 | * QB ORDER BY data |
140 | 140 | * |
141 | 141 | * @var array |
142 | 142 | */ |
143 | - protected $qb_orderby = array(); |
|
143 | + protected $qb_orderby = array(); |
|
144 | 144 | |
145 | 145 | /** |
146 | 146 | * QB data sets |
147 | 147 | * |
148 | 148 | * @var array |
149 | 149 | */ |
150 | - protected $qb_set = array(); |
|
150 | + protected $qb_set = array(); |
|
151 | 151 | |
152 | 152 | /** |
153 | 153 | * QB aliased tables list |
154 | 154 | * |
155 | 155 | * @var array |
156 | 156 | */ |
157 | - protected $qb_aliased_tables = array(); |
|
157 | + protected $qb_aliased_tables = array(); |
|
158 | 158 | |
159 | 159 | /** |
160 | 160 | * QB WHERE group started flag |
161 | 161 | * |
162 | 162 | * @var bool |
163 | 163 | */ |
164 | - protected $qb_where_group_started = FALSE; |
|
164 | + protected $qb_where_group_started = FALSE; |
|
165 | 165 | |
166 | 166 | /** |
167 | 167 | * QB WHERE group count |
168 | 168 | * |
169 | 169 | * @var int |
170 | 170 | */ |
171 | - protected $qb_where_group_count = 0; |
|
171 | + protected $qb_where_group_count = 0; |
|
172 | 172 | |
173 | 173 | // Query Builder Caching variables |
174 | 174 | |
@@ -177,84 +177,84 @@ discard block |
||
177 | 177 | * |
178 | 178 | * @var bool |
179 | 179 | */ |
180 | - protected $qb_caching = FALSE; |
|
180 | + protected $qb_caching = FALSE; |
|
181 | 181 | |
182 | 182 | /** |
183 | 183 | * QB Cache exists list |
184 | 184 | * |
185 | 185 | * @var array |
186 | 186 | */ |
187 | - protected $qb_cache_exists = array(); |
|
187 | + protected $qb_cache_exists = array(); |
|
188 | 188 | |
189 | 189 | /** |
190 | 190 | * QB Cache SELECT data |
191 | 191 | * |
192 | 192 | * @var array |
193 | 193 | */ |
194 | - protected $qb_cache_select = array(); |
|
194 | + protected $qb_cache_select = array(); |
|
195 | 195 | |
196 | 196 | /** |
197 | 197 | * QB Cache FROM data |
198 | 198 | * |
199 | 199 | * @var array |
200 | 200 | */ |
201 | - protected $qb_cache_from = array(); |
|
201 | + protected $qb_cache_from = array(); |
|
202 | 202 | |
203 | 203 | /** |
204 | 204 | * QB Cache JOIN data |
205 | 205 | * |
206 | 206 | * @var array |
207 | 207 | */ |
208 | - protected $qb_cache_join = array(); |
|
208 | + protected $qb_cache_join = array(); |
|
209 | 209 | |
210 | 210 | /** |
211 | 211 | * QB Cache WHERE data |
212 | 212 | * |
213 | 213 | * @var array |
214 | 214 | */ |
215 | - protected $qb_cache_where = array(); |
|
215 | + protected $qb_cache_where = array(); |
|
216 | 216 | |
217 | 217 | /** |
218 | 218 | * QB Cache GROUP BY data |
219 | 219 | * |
220 | 220 | * @var array |
221 | 221 | */ |
222 | - protected $qb_cache_groupby = array(); |
|
222 | + protected $qb_cache_groupby = array(); |
|
223 | 223 | |
224 | 224 | /** |
225 | 225 | * QB Cache HAVING data |
226 | 226 | * |
227 | 227 | * @var array |
228 | 228 | */ |
229 | - protected $qb_cache_having = array(); |
|
229 | + protected $qb_cache_having = array(); |
|
230 | 230 | |
231 | 231 | /** |
232 | 232 | * QB Cache ORDER BY data |
233 | 233 | * |
234 | 234 | * @var array |
235 | 235 | */ |
236 | - protected $qb_cache_orderby = array(); |
|
236 | + protected $qb_cache_orderby = array(); |
|
237 | 237 | |
238 | 238 | /** |
239 | 239 | * QB Cache data sets |
240 | 240 | * |
241 | 241 | * @var array |
242 | 242 | */ |
243 | - protected $qb_cache_set = array(); |
|
243 | + protected $qb_cache_set = array(); |
|
244 | 244 | |
245 | 245 | /** |
246 | 246 | * QB No Escape data |
247 | 247 | * |
248 | 248 | * @var array |
249 | 249 | */ |
250 | - protected $qb_no_escape = array(); |
|
250 | + protected $qb_no_escape = array(); |
|
251 | 251 | |
252 | 252 | /** |
253 | 253 | * QB Cache No Escape data |
254 | 254 | * |
255 | 255 | * @var array |
256 | 256 | */ |
257 | - protected $qb_cache_no_escape = array(); |
|
257 | + protected $qb_cache_no_escape = array(); |
|
258 | 258 | |
259 | 259 | // -------------------------------------------------------------------- |
260 | 260 | |
@@ -2605,9 +2605,9 @@ discard block |
||
2605 | 2605 | |
2606 | 2606 | foreach (array_unique($this->qb_cache_exists) as $val) // select, from, etc. |
2607 | 2607 | { |
2608 | - $qb_variable = 'qb_'.$val; |
|
2609 | - $qb_cache_var = 'qb_cache_'.$val; |
|
2610 | - $qb_new = $this->$qb_cache_var; |
|
2608 | + $qb_variable = 'qb_'.$val; |
|
2609 | + $qb_cache_var = 'qb_cache_'.$val; |
|
2610 | + $qb_new = $this->$qb_cache_var; |
|
2611 | 2611 | |
2612 | 2612 | for ($i = 0, $c = count($this->$qb_variable); $i < $c; $i++) |
2613 | 2613 | { |
@@ -69,28 +69,28 @@ |
||
69 | 69 | * |
70 | 70 | * @var array[] |
71 | 71 | */ |
72 | - public $result_array = array(); |
|
72 | + public $result_array = array(); |
|
73 | 73 | |
74 | 74 | /** |
75 | 75 | * Result Object |
76 | 76 | * |
77 | 77 | * @var object[] |
78 | 78 | */ |
79 | - public $result_object = array(); |
|
79 | + public $result_object = array(); |
|
80 | 80 | |
81 | 81 | /** |
82 | 82 | * Custom Result Object |
83 | 83 | * |
84 | 84 | * @var object[] |
85 | 85 | */ |
86 | - public $custom_result_object = array(); |
|
86 | + public $custom_result_object = array(); |
|
87 | 87 | |
88 | 88 | /** |
89 | 89 | * Current Row index |
90 | 90 | * |
91 | 91 | * @var int |
92 | 92 | */ |
93 | - public $current_row = 0; |
|
93 | + public $current_row = 0; |
|
94 | 94 | |
95 | 95 | /** |
96 | 96 | * Number of rows |
@@ -60,21 +60,21 @@ discard block |
||
60 | 60 | * |
61 | 61 | * @var string |
62 | 62 | */ |
63 | - protected $_list_databases = FALSE; |
|
63 | + protected $_list_databases = FALSE; |
|
64 | 64 | |
65 | 65 | /** |
66 | 66 | * OPTIMIZE TABLE statement |
67 | 67 | * |
68 | 68 | * @var string |
69 | 69 | */ |
70 | - protected $_optimize_table = FALSE; |
|
70 | + protected $_optimize_table = FALSE; |
|
71 | 71 | |
72 | 72 | /** |
73 | 73 | * REPAIR TABLE statement |
74 | 74 | * |
75 | 75 | * @var string |
76 | 76 | */ |
77 | - protected $_repair_table = FALSE; |
|
77 | + protected $_repair_table = FALSE; |
|
78 | 78 | |
79 | 79 | // -------------------------------------------------------------------- |
80 | 80 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function __construct(&$db) |
88 | 88 | { |
89 | - $this->db =& $db; |
|
89 | + $this->db = & $db; |
|
90 | 90 | log_message('info', 'Database Utility Class Initialized'); |
91 | 91 | } |
92 | 92 | |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | |
406 | 406 | // Load the Zip class and output it |
407 | - $CI =& get_instance(); |
|
407 | + $CI = & get_instance(); |
|
408 | 408 | $CI->load->library('zip'); |
409 | 409 | $CI->zip->add_data($prefs['filename'], $this->_backup($prefs)); |
410 | 410 | return $CI->zip->get_zip(); |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @var string |
53 | 53 | */ |
54 | - protected $_create_database = FALSE; |
|
54 | + protected $_create_database = FALSE; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * CREATE TABLE keys flag |
@@ -61,28 +61,28 @@ discard block |
||
61 | 61 | * |
62 | 62 | * @var bool |
63 | 63 | */ |
64 | - protected $_create_table_keys = TRUE; |
|
64 | + protected $_create_table_keys = TRUE; |
|
65 | 65 | |
66 | 66 | /** |
67 | 67 | * DROP DATABASE statement |
68 | 68 | * |
69 | 69 | * @var string |
70 | 70 | */ |
71 | - protected $_drop_database = FALSE; |
|
71 | + protected $_drop_database = FALSE; |
|
72 | 72 | |
73 | 73 | /** |
74 | 74 | * CREATE TABLE IF statement |
75 | 75 | * |
76 | 76 | * @var string |
77 | 77 | */ |
78 | - protected $_create_table_if = FALSE; |
|
78 | + protected $_create_table_if = FALSE; |
|
79 | 79 | |
80 | 80 | /** |
81 | 81 | * UNSIGNED support |
82 | 82 | * |
83 | 83 | * @var array |
84 | 84 | */ |
85 | - protected $_unsigned = array( |
|
85 | + protected $_unsigned = array( |
|
86 | 86 | 'SHORT' => 'INTEGER', |
87 | 87 | 'SMALLINT' => 'INTEGER', |
88 | 88 | 'INT' => 'BIGINT', |
@@ -51,28 +51,28 @@ discard block |
||
51 | 51 | * |
52 | 52 | * @var string |
53 | 53 | */ |
54 | - protected $_create_table_if = FALSE; |
|
54 | + protected $_create_table_if = FALSE; |
|
55 | 55 | |
56 | 56 | /** |
57 | 57 | * RENAME TABLE statement |
58 | 58 | * |
59 | 59 | * @var string |
60 | 60 | */ |
61 | - protected $_rename_table = FALSE; |
|
61 | + protected $_rename_table = FALSE; |
|
62 | 62 | |
63 | 63 | /** |
64 | 64 | * DROP TABLE IF statement |
65 | 65 | * |
66 | 66 | * @var string |
67 | 67 | */ |
68 | - protected $_drop_table_if = FALSE; |
|
68 | + protected $_drop_table_if = FALSE; |
|
69 | 69 | |
70 | 70 | /** |
71 | 71 | * UNSIGNED support |
72 | 72 | * |
73 | 73 | * @var array |
74 | 74 | */ |
75 | - protected $_unsigned = array( |
|
75 | + protected $_unsigned = array( |
|
76 | 76 | 'SMALLINT' => 'INTEGER', |
77 | 77 | 'INTEGER' => 'INT64', |
78 | 78 | 'FLOAT' => 'DOUBLE PRECISION' |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | * |
84 | 84 | * @var string |
85 | 85 | */ |
86 | - protected $_null = 'NULL'; |
|
86 | + protected $_null = 'NULL'; |
|
87 | 87 | |
88 | 88 | // -------------------------------------------------------------------- |
89 | 89 |