60 | | | |
61 | // -------------------------------------------------------------------- | | |
62 | | | |
63 | function &dbprefix($table = ''){ | | |
64 | return $this->db->dbprefix($table); | | |
65 | } | | |
66 | function &select($select = '*', $protect_identifiers = TRUE){ | | |
67 | $this->db->select($select, $protect_identifiers); | | |
68 | return $this; | | |
69 | } | | |
70 | function &select_max($select = '', $alias=''){ | | |
71 | $this->db->select_max($select, $alias); | | |
72 | return $this; | | |
73 | } | | |
74 | function &select_min($select = '', $alias=''){ | | |
75 | $this->db->select_min($select, $alias); | | |
76 | return $this; | | |
77 | } | | |
78 | function &select_avg($select = '', $alias=''){ | | |
79 | $this->db->select_avg($select, $alias); | | |
80 | return $this; | | |
81 | } | | |
82 | function &select_sum($select = '', $alias=''){ | | |
83 | $this->db->select_sum($select, $alias); | | |
84 | return $this; | | |
85 | } | | |
86 | function &distinct($val = TRUE){ | | |
87 | $this->db->distinct($val); | | |
88 | return $this; | | |
89 | } | | |
90 | function &from($from){ | | |
91 | $this->db->from($from); | | |
92 | return $this; | | |
93 | } | | |
94 | function &join($table, $cond, $type = ''){ | | |
95 | $this->db->join($table, $cond, $type); | | |
96 | return $this; | | |
97 | } | | |
98 | function &where($key, $value = NULL, $escape = TRUE){ | | |
99 | $this->db->where($key, $value, $escape); | | |
100 | return $this; | | |
101 | } | | |
102 | function &or_where($key, $value = NULL, $escape = TRUE){ | | |
103 | $this->db->or_where($key, $value, $escape); | | |
104 | return $this; | | |
105 | } | | |
106 | function &orwhere($key, $value = NULL, $escape = TRUE){ | | |
107 | $this->db->orwhere($key, $value, $escape); | | |
108 | return $this; | | |
109 | } | | |
110 | function &where_in($key = NULL, $values = NULL){ | | |
111 | $this->db->where_in($key, $values); | | |
112 | return $this; | | |
113 | } | | |
114 | function &or_where_in($key = NULL, $values = NULL){ | | |
115 | $this->db->or_where_in($key, $values); | | |
116 | return $this; | | |
117 | } | | |
118 | function &where_not_in($key = NULL, $values = NULL){ | | |
119 | $this->db->where_not_in($key, $values); | | |
120 | return $this; | | |
121 | } | | |
122 | function &or_where_not_in($key = NULL, $values = NULL){ | | |
123 | $this->db->or_where_not_in($key, $values); | | |
124 | return $this; | | |
125 | } | | |
126 | function &like($field, $match = '', $side = 'both'){ | | |
127 | $this->db->like($field, $match, $side); | | |
128 | return $this; | | |
129 | } | | |
130 | function ¬_like($field, $match = '', $side = 'both'){ | | |
131 | $this->db->not_like($field, $match, $side); | | |
132 | return $this; | | |
133 | } | | |
134 | function &or_like($field, $match = '', $side = 'both'){ | | |
135 | $this->db->or_like($field, $match, $side); | | |
136 | return $this; | | |
137 | } | | |
138 | function &or_not_like($field, $match = '', $side = 'both'){ | | |
139 | $this->db->or_not_like($field, $match, $side); | | |
140 | return $this; | | |
141 | } | | |
142 | function &orlike($field, $match = '', $side = 'both'){ | | |
143 | $this->db->orlike($field, $match, $side); | | |
144 | return $this; | | |
145 | } | | |
146 | function &group_by($by){ | | |
147 | $this->db->group_by($by); | | |
148 | return $this; | | |
149 | } | | |
150 | function &groupby($by){ | | |
151 | $this->db->groupby($by); | | |
152 | return $this; | | |
153 | } | | |
154 | function &having($key, $value = '', $escape = TRUE){ | | |
155 | $this->db->having($key, $value, $escape); | | |
156 | return $this; | | |
157 | } | | |
158 | function &orhaving($key, $value = '', $escape = TRUE){ | | |
159 | $this->db->orhaving($key, $value, $escape); | | |
160 | return $this; | | |
161 | } | | |
162 | function &or_having($key, $value = '', $escape = TRUE){ | | |
163 | $this->db->or_having($key, $value, $escape); | | |
164 | return $this; | | |
165 | } | | |
166 | function &order_by($orderby, $direction = ''){ | | |
167 | $this->db->order_by($orderby, $direction); | | |
168 | return $this; | | |
169 | } | | |
170 | function &orderby($orderby, $direction = ''){ | | |
171 | $this->db->orderby($orderby, $direction); | | |
172 | return $this; | | |
173 | } | | |
174 | function &limit($value, $offset = ''){ | | |
175 | $this->db->limit($value, $offset); | | |
176 | return $this; | | |
177 | } | | |
178 | function &offset($offset){ | | |
179 | $this->db->offset($offset); | | |
180 | return $this; | | |
181 | } | | |
182 | function db_set($key, $value = '', $escape = TRUE){ | | |
183 | return $this->db->set($key, $value, $escape); | | |
184 | } | | |
185 | function db_get($table = '', $limit = null, $offset = null){ | | |
186 | return $this->db->get($table, $limit, $offset); | | |
187 | } | | |
188 | function count_all_results($table = ''){ | | |
189 | return $this->db->count_all_results($table); | | |
190 | } | | |
191 | function db_get_where($table = '', $where = null, $limit = null, $offset = null){ | | |
192 | return $this->db->get_where($table, $where, $limit, $offset); | | |
193 | } | | |
194 | function db_insert($table = '', $set = NULL){ | | |
195 | return $this->db->insert($table, $set); | | |
196 | } | | |
197 | function db_update($table = '', $set = NULL, $where = NULL, $limit = NULL){ | | |
198 | return $this->db->update($table, $set, $where, $limit); | | |
199 | } | | |
200 | function db_empty_table($table = ''){ | | |
201 | return $this->db->empty_table($table); | | |
202 | } | | |
203 | function db_truncate($table = ''){ | | |
204 | return $this->db->truncate($table); | | |
205 | } | | |
206 | function db_delete($table = '', $where = '', $limit = NULL, $reset_data = TRUE){ | | |
207 | return $this->db->delete($table, $where, $limit, $reset_data); | | |
208 | } | | |
209 | function db_use_table($table){ | | |
210 | return $this->db->use_table($table); | | |
211 | } | | |
212 | function &start_cache(){ | | |
213 | $this->db->start_cache(); | | |
214 | return $this; | | |
215 | } | | |
216 | function &stop_cache(){ | | |
217 | $this->db->stop_cache(); | | |
218 | return $this; | | |
219 | } | | |
220 | function &flush_cache(){ | | |
221 | $this->db->flush_cache(); | | |
222 | return $this; | | |
223 | } | | |