Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Greg Aker | 741de1c | 2010-11-10 14:52:57 -0600 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.1.6 or newer |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 6 | * |
| 7 | * @package CodeIgniter |
| 8 | * @author ExpressionEngine Dev Team |
Greg Aker | 0711dc8 | 2011-01-05 10:49:40 -0600 | [diff] [blame] | 9 | * @copyright Copyright (c) 2008 - 2011, EllisLab, Inc. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 10 | * @license http://codeigniter.com/user_guide/license.html |
| 11 | * @link http://codeigniter.com |
| 12 | * @since Version 1.0 |
| 13 | * @filesource |
| 14 | */ |
| 15 | |
| 16 | // ------------------------------------------------------------------------ |
| 17 | |
| 18 | /** |
| 19 | * Database Result Class |
| 20 | * |
| 21 | * This is the platform-independent result class. |
| 22 | * This class will not be called directly. Rather, the adapter |
| 23 | * class for the specific database will extend and instantiate it. |
| 24 | * |
| 25 | * @category Database |
| 26 | * @author ExpressionEngine Dev Team |
| 27 | * @link http://codeigniter.com/user_guide/database/ |
| 28 | */ |
| 29 | class CI_DB_result { |
| 30 | |
Derek Jones | d01e4a6 | 2011-07-01 18:04:45 -0500 | [diff] [blame] | 31 | var $conn_id = NULL; |
| 32 | var $result_id = NULL; |
| 33 | var $result_array = array(); |
| 34 | var $result_object = array(); |
| 35 | var $custom_result_object = array(); |
| 36 | var $current_row = 0; |
| 37 | var $num_rows = 0; |
| 38 | var $row_data = NULL; |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 39 | |
| 40 | |
| 41 | /** |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 42 | * Query result. Acts as a wrapper function for the following functions. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 43 | * |
| 44 | * @access public |
| 45 | * @param string can be "object" or "array" |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 46 | * @return mixed either a result object or array |
| 47 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 48 | public function result($type = 'object') |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 49 | { |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 50 | if ($type == 'array') return $this->result_array(); |
| 51 | else if ($type == 'object') return $this->result_object(); |
| 52 | else return $this->custom_result_object($type); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 53 | } |
| 54 | |
| 55 | // -------------------------------------------------------------------- |
| 56 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 57 | /** |
| 58 | * Custom query result. |
| 59 | * |
| 60 | * @param class_name A string that represents the type of object you want back |
| 61 | * @return array of objects |
| 62 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 63 | public function custom_result_object($class_name) |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 64 | { |
| 65 | if (array_key_exists($class_name, $this->custom_result_object)) |
| 66 | { |
| 67 | return $this->custom_result_object[$class_name]; |
| 68 | } |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 69 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 70 | if ($this->result_id === FALSE OR $this->num_rows() == 0) |
| 71 | { |
| 72 | return array(); |
| 73 | } |
Razican | 114ab09 | 2011-04-25 17:26:45 +0200 | [diff] [blame] | 74 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 75 | // add the data to the object |
| 76 | $this->_data_seek(0); |
| 77 | $result_object = array(); |
| 78 | |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 79 | while ($row = $this->_fetch_object()) |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 80 | { |
| 81 | $object = new $class_name(); |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 82 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 83 | foreach ($row as $key => $value) |
| 84 | { |
| 85 | $object->$key = $value; |
| 86 | } |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 87 | |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 88 | $result_object[] = $object; |
| 89 | } |
| 90 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 91 | // return the array |
| 92 | return $this->custom_result_object[$class_name] = $result_object; |
| 93 | } |
| 94 | |
| 95 | // -------------------------------------------------------------------- |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 96 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 97 | /** |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 98 | * Query result. "object" version. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 99 | * |
| 100 | * @access public |
| 101 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 102 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 103 | public function result_object() |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 104 | { |
| 105 | if (count($this->result_object) > 0) |
| 106 | { |
| 107 | return $this->result_object; |
| 108 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 109 | |
| 110 | // In the event that query caching is on the result_id variable |
| 111 | // will return FALSE since there isn't a valid SQL resource so |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 112 | // we'll simply return an empty array. |
| 113 | if ($this->result_id === FALSE OR $this->num_rows() == 0) |
| 114 | { |
| 115 | return array(); |
| 116 | } |
| 117 | |
| 118 | $this->_data_seek(0); |
| 119 | while ($row = $this->_fetch_object()) |
| 120 | { |
| 121 | $this->result_object[] = $row; |
| 122 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 123 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 124 | return $this->result_object; |
| 125 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 126 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 127 | // -------------------------------------------------------------------- |
| 128 | |
| 129 | /** |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 130 | * Query result. "array" version. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 131 | * |
| 132 | * @access public |
| 133 | * @return array |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 134 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 135 | public function result_array() |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 136 | { |
| 137 | if (count($this->result_array) > 0) |
| 138 | { |
| 139 | return $this->result_array; |
| 140 | } |
| 141 | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 142 | // In the event that query caching is on the result_id variable |
| 143 | // will return FALSE since there isn't a valid SQL resource so |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 144 | // we'll simply return an empty array. |
| 145 | if ($this->result_id === FALSE OR $this->num_rows() == 0) |
| 146 | { |
| 147 | return array(); |
| 148 | } |
| 149 | |
| 150 | $this->_data_seek(0); |
| 151 | while ($row = $this->_fetch_assoc()) |
| 152 | { |
| 153 | $this->result_array[] = $row; |
| 154 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 155 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 156 | return $this->result_array; |
| 157 | } |
| 158 | |
| 159 | // -------------------------------------------------------------------- |
| 160 | |
| 161 | /** |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 162 | * Query result. Acts as a wrapper function for the following functions. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 163 | * |
| 164 | * @access public |
| 165 | * @param string |
| 166 | * @param string can be "object" or "array" |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 167 | * @return mixed either a result object or array |
| 168 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 169 | public function row($n = 0, $type = 'object') |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 170 | { |
| 171 | if ( ! is_numeric($n)) |
| 172 | { |
| 173 | // We cache the row data for subsequent uses |
| 174 | if ( ! is_array($this->row_data)) |
| 175 | { |
| 176 | $this->row_data = $this->row_array(0); |
| 177 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 178 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 179 | // array_key_exists() instead of isset() to allow for MySQL NULL values |
| 180 | if (array_key_exists($n, $this->row_data)) |
| 181 | { |
| 182 | return $this->row_data[$n]; |
| 183 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 184 | // reset the $n variable if the result was not achieved |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 185 | $n = 0; |
| 186 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 187 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 188 | if ($type == 'object') return $this->row_object($n); |
| 189 | else if ($type == 'array') return $this->row_array($n); |
| 190 | else return $this->custom_row_object($n, $type); |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 191 | } |
| 192 | |
| 193 | // -------------------------------------------------------------------- |
| 194 | |
| 195 | /** |
| 196 | * Assigns an item into a particular column slot |
| 197 | * |
| 198 | * @access public |
| 199 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 200 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 201 | public function set_row($key, $value = NULL) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 202 | { |
| 203 | // We cache the row data for subsequent uses |
| 204 | if ( ! is_array($this->row_data)) |
| 205 | { |
| 206 | $this->row_data = $this->row_array(0); |
| 207 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 208 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 209 | if (is_array($key)) |
| 210 | { |
| 211 | foreach ($key as $k => $v) |
| 212 | { |
| 213 | $this->row_data[$k] = $v; |
| 214 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 215 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 216 | return; |
| 217 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 218 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 219 | if ($key != '' AND ! is_null($value)) |
| 220 | { |
| 221 | $this->row_data[$key] = $value; |
| 222 | } |
| 223 | } |
| 224 | |
| 225 | // -------------------------------------------------------------------- |
| 226 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 227 | /** |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 228 | * Returns a single result row - custom object version |
| 229 | * |
| 230 | * @access public |
| 231 | * @return object |
| 232 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 233 | public function custom_row_object($n, $type) |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 234 | { |
| 235 | $result = $this->custom_result_object($type); |
| 236 | |
| 237 | if (count($result) == 0) |
| 238 | { |
| 239 | return $result; |
| 240 | } |
| 241 | |
| 242 | if ($n != $this->current_row AND isset($result[$n])) |
| 243 | { |
| 244 | $this->current_row = $n; |
| 245 | } |
| 246 | |
| 247 | return $result[$this->current_row]; |
| 248 | } |
| 249 | |
Greg Aker | e70e92b | 2011-04-25 10:50:53 -0500 | [diff] [blame] | 250 | /** |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 251 | * Returns a single result row - object version |
| 252 | * |
| 253 | * @access public |
| 254 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 255 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 256 | public function row_object($n = 0) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 257 | { |
| 258 | $result = $this->result_object(); |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 259 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 260 | if (count($result) == 0) |
| 261 | { |
| 262 | return $result; |
| 263 | } |
| 264 | |
| 265 | if ($n != $this->current_row AND isset($result[$n])) |
| 266 | { |
| 267 | $this->current_row = $n; |
| 268 | } |
| 269 | |
| 270 | return $result[$this->current_row]; |
| 271 | } |
| 272 | |
| 273 | // -------------------------------------------------------------------- |
| 274 | |
| 275 | /** |
| 276 | * Returns a single result row - array version |
| 277 | * |
| 278 | * @access public |
| 279 | * @return array |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 280 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 281 | public function row_array($n = 0) |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 282 | { |
| 283 | $result = $this->result_array(); |
| 284 | |
| 285 | if (count($result) == 0) |
| 286 | { |
| 287 | return $result; |
| 288 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 289 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 290 | if ($n != $this->current_row AND isset($result[$n])) |
| 291 | { |
| 292 | $this->current_row = $n; |
| 293 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 294 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 295 | return $result[$this->current_row]; |
| 296 | } |
| 297 | |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 298 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 299 | // -------------------------------------------------------------------- |
| 300 | |
| 301 | /** |
| 302 | * Returns the "first" row |
| 303 | * |
| 304 | * @access public |
| 305 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 306 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 307 | public function first_row($type = 'object') |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 308 | { |
| 309 | $result = $this->result($type); |
| 310 | |
| 311 | if (count($result) == 0) |
| 312 | { |
| 313 | return $result; |
| 314 | } |
| 315 | return $result[0]; |
| 316 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 317 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 318 | // -------------------------------------------------------------------- |
| 319 | |
| 320 | /** |
| 321 | * Returns the "last" row |
| 322 | * |
| 323 | * @access public |
| 324 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 325 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 326 | public function last_row($type = 'object') |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 327 | { |
| 328 | $result = $this->result($type); |
| 329 | |
| 330 | if (count($result) == 0) |
| 331 | { |
| 332 | return $result; |
| 333 | } |
| 334 | return $result[count($result) -1]; |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 335 | } |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 336 | |
| 337 | // -------------------------------------------------------------------- |
| 338 | |
| 339 | /** |
| 340 | * Returns the "next" row |
| 341 | * |
| 342 | * @access public |
| 343 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 344 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 345 | public function next_row($type = 'object') |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 346 | { |
| 347 | $result = $this->result($type); |
| 348 | |
| 349 | if (count($result) == 0) |
| 350 | { |
| 351 | return $result; |
| 352 | } |
| 353 | |
| 354 | if (isset($result[$this->current_row + 1])) |
| 355 | { |
| 356 | ++$this->current_row; |
| 357 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 358 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 359 | return $result[$this->current_row]; |
| 360 | } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 361 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 362 | // -------------------------------------------------------------------- |
| 363 | |
| 364 | /** |
| 365 | * Returns the "previous" row |
| 366 | * |
| 367 | * @access public |
| 368 | * @return object |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 369 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 370 | public function previous_row($type = 'object') |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 371 | { |
| 372 | $result = $this->result($type); |
| 373 | |
| 374 | if (count($result) == 0) |
| 375 | { |
| 376 | return $result; |
| 377 | } |
| 378 | |
| 379 | if (isset($result[$this->current_row - 1])) |
| 380 | { |
| 381 | --$this->current_row; |
| 382 | } |
| 383 | return $result[$this->current_row]; |
| 384 | } |
| 385 | |
| 386 | // -------------------------------------------------------------------- |
| 387 | |
| 388 | /** |
| 389 | * The following functions are normally overloaded by the identically named |
| 390 | * methods in the platform-specific driver -- except when query caching |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 391 | * is used. When caching is enabled we do not load the other driver. |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 392 | * These functions are primarily here to prevent undefined function errors |
Derek Jones | 37f4b9c | 2011-07-01 17:56:50 -0500 | [diff] [blame] | 393 | * when a cached result object is in use. They are not otherwise fully |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 394 | * operational due to the unavailability of the database resource IDs with |
| 395 | * cached results. |
| 396 | */ |
Andrey Andreev | bc95e47 | 2011-10-20 09:44:48 +0300 | [diff] [blame^] | 397 | public function num_rows() { return $this->num_rows; } |
| 398 | public function num_fields() { return 0; } |
| 399 | public function list_fields() { return array(); } |
| 400 | public function field_data() { return array(); } |
| 401 | public function free_result() { return TRUE; } |
| 402 | protected function _data_seek() { return TRUE; } |
| 403 | protected function _fetch_assoc() { return array(); } |
| 404 | protected function _fetch_object() { return array(); } |
Barry Mieny | dd67197 | 2010-10-04 16:33:58 +0200 | [diff] [blame] | 405 | |
Derek Allard | 2067d1a | 2008-11-13 22:59:24 +0000 | [diff] [blame] | 406 | } |
| 407 | // END DB_result class |
| 408 | |
| 409 | /* End of file DB_result.php */ |
John Crepezzi | 7b47430 | 2011-01-15 18:17:01 -0500 | [diff] [blame] | 410 | /* Location: ./system/database/DB_result.php */ |