blob: 9d91932525a9e36902402a0093ce2f6eba344972 [file] [log] [blame]
Derek Jones0b59f272008-05-13 04:22:33 +00001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Allardd2df9bc2007-04-15 17:41:17 +00002/**
3 * CodeIgniter
4 *
5 * An open source application development framework for PHP 4.3.2 or newer
6 *
Derek Allard3d879d52008-01-18 19:41:32 +00007 * @package CodeIgniter
8 * @author ExpressionEngine Dev Team
Rick Ellis37b3ecf2008-09-12 23:34:18 +00009 * @copyright Copyright (c) 2008, EllisLab, Inc.
Derek Jones7a9193a2008-01-21 18:39:20 +000010 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
Derek Allard3d879d52008-01-18 19:41:32 +000012 * @since Version 1.0
Derek Allardd2df9bc2007-04-15 17:41:17 +000013 * @filesource
14 */
15
16// ------------------------------------------------------------------------
17
18/**
19 * oci8 Database Adapter Class
20 *
21 * Note: _DB is an extender class that the app controller
22 * creates dynamically based on whether the active record
23 * class is being used or not.
24 *
Derek Allard3d879d52008-01-18 19:41:32 +000025 * @package CodeIgniter
Derek Allardd2df9bc2007-04-15 17:41:17 +000026 * @subpackage Drivers
27 * @category Database
Derek Allard3d879d52008-01-18 19:41:32 +000028 * @author ExpressionEngine Dev Team
Derek Jones7a9193a2008-01-21 18:39:20 +000029 * @link http://codeigniter.com/user_guide/database/
Derek Allardd2df9bc2007-04-15 17:41:17 +000030 */
31
32/**
33 * oci8 Database Adapter Class
34 *
35 * This is a modification of the DB_driver class to
36 * permit access to oracle databases
37 *
38 * NOTE: this uses the PHP 4 oci methods
39 *
40 * @author Kelly McArdle
41 *
42 */
43
44class CI_DB_oci8_driver extends CI_DB {
45
Derek Allard694b5b82007-12-18 15:58:03 +000046 /**
47 * The syntax to count rows is slightly different across different
48 * database engines, so this string appears in each driver and is
49 * used for the count_all() and count_all_results() functions.
50 */
Derek Allard39b622d2008-01-16 21:10:09 +000051 var $_count_string = "SELECT COUNT(1) AS ";
52 var $_random_keyword = ' ASC'; // not currently supported
Derek Allard694b5b82007-12-18 15:58:03 +000053
Derek Allardd2df9bc2007-04-15 17:41:17 +000054 // Set "auto commit" by default
55 var $_commit = OCI_COMMIT_ON_SUCCESS;
56
57 // need to track statement id and cursor id
58 var $stmt_id;
59 var $curs_id;
60
61 // if we use a limit, we will add a field that will
62 // throw off num_fields later
63 var $limit_used;
64
65 /**
66 * Non-persistent database connection
67 *
68 * @access private called by the base class
69 * @return resource
70 */
71 function db_connect()
72 {
73 return @ocilogon($this->username, $this->password, $this->hostname);
74 }
75
76 // --------------------------------------------------------------------
77
78 /**
79 * Persistent database connection
80 *
81 * @access private called by the base class
82 * @return resource
83 */
84 function db_pconnect()
85 {
86 return @ociplogon($this->username, $this->password, $this->hostname);
87 }
88
89 // --------------------------------------------------------------------
90
91 /**
92 * Select the database
93 *
94 * @access private called by the base class
95 * @return resource
96 */
97 function db_select()
98 {
99 return TRUE;
100 }
101
102 // --------------------------------------------------------------------
103
104 /**
Derek Allard39b622d2008-01-16 21:10:09 +0000105 * Set client character set
106 *
107 * @access public
108 * @param string
109 * @param string
110 * @return resource
111 */
112 function db_set_charset($charset, $collation)
113 {
Rick Ellisff734012008-09-30 20:38:12 +0000114 // @todo - add support if needed
Derek Allard39b622d2008-01-16 21:10:09 +0000115 return TRUE;
116 }
117
118 // --------------------------------------------------------------------
119
120 /**
Derek Allardd2df9bc2007-04-15 17:41:17 +0000121 * Version number query string
122 *
123 * @access public
124 * @return string
125 */
126 function _version()
127 {
128 return ociserverversion($this->conn_id);
129 }
130
131 // --------------------------------------------------------------------
132
133 /**
134 * Execute the query
135 *
136 * @access private called by the base class
137 * @param string an SQL query
138 * @return resource
139 */
140 function _execute($sql)
141 {
142 // oracle must parse the query before it is run. All of the actions with
143 // the query are based on the statement id returned by ociparse
144 $this->_set_stmt_id($sql);
145 ocisetprefetch($this->stmt_id, 1000);
146 return @ociexecute($this->stmt_id, $this->_commit);
147 }
148
149 /**
150 * Generate a statement ID
151 *
152 * @access private
153 * @param string an SQL query
154 * @return none
155 */
156 function _set_stmt_id($sql)
157 {
Derek Jones0b59f272008-05-13 04:22:33 +0000158 if ( ! is_resource($this->stmt_id))
Derek Allardd2df9bc2007-04-15 17:41:17 +0000159 {
160 $this->stmt_id = ociparse($this->conn_id, $this->_prep_query($sql));
161 }
162 }
163
164 // --------------------------------------------------------------------
165
166 /**
167 * Prep the query
168 *
169 * If needed, each database adapter can prep the query string
170 *
171 * @access private called by execute()
172 * @param string an SQL query
173 * @return string
174 */
175 function _prep_query($sql)
176 {
177 return $sql;
178 }
179
180 // --------------------------------------------------------------------
181
182 /**
183 * getCursor. Returns a cursor from the datbase
184 *
185 * @access public
186 * @return cursor id
187 */
188 function get_cursor()
189 {
190 $this->curs_id = ocinewcursor($this->conn_id);
191 return $this->curs_id;
192 }
193
194 // --------------------------------------------------------------------
195
196 /**
197 * Stored Procedure. Executes a stored procedure
198 *
199 * @access public
200 * @param package package stored procedure is in
201 * @param procedure stored procedure to execute
202 * @param params array of parameters
203 * @return array
204 *
205 * params array keys
206 *
207 * KEY OPTIONAL NOTES
208 * name no the name of the parameter should be in :<param_name> format
209 * value no the value of the parameter. If this is an OUT or IN OUT parameter,
210 * this should be a reference to a variable
211 * type yes the type of the parameter
212 * length yes the max size of the parameter
213 */
214 function stored_procedure($package, $procedure, $params)
215 {
216 if ($package == '' OR $procedure == '' OR ! is_array($params))
217 {
218 if ($this->db_debug)
219 {
220 log_message('error', 'Invalid query: '.$package.'.'.$procedure);
221 return $this->display_error('db_invalid_query');
222 }
223 return FALSE;
224 }
225
226 // build the query string
227 $sql = "begin $package.$procedure(";
228
229 $have_cursor = FALSE;
230 foreach($params as $param)
231 {
232 $sql .= $param['name'] . ",";
233
234 if (array_key_exists('type', $param) && ($param['type'] == OCI_B_CURSOR))
235 {
236 $have_cursor = TRUE;
237 }
238 }
239 $sql = trim($sql, ",") . "); end;";
240
241 $this->stmt_id = FALSE;
242 $this->_set_stmt_id($sql);
243 $this->_bind_params($params);
244 $this->query($sql, FALSE, $have_cursor);
245 }
246
247 // --------------------------------------------------------------------
248
249 /**
250 * Bind parameters
251 *
252 * @access private
253 * @return none
254 */
255 function _bind_params($params)
256 {
Derek Jones0b59f272008-05-13 04:22:33 +0000257 if ( ! is_array($params) OR ! is_resource($this->stmt_id))
Derek Allardd2df9bc2007-04-15 17:41:17 +0000258 {
259 return;
260 }
261
262 foreach ($params as $param)
263 {
264 foreach (array('name', 'value', 'type', 'length') as $val)
265 {
Derek Jones0b59f272008-05-13 04:22:33 +0000266 if ( ! isset($param[$val]))
Derek Allardd2df9bc2007-04-15 17:41:17 +0000267 {
268 $param[$val] = '';
269 }
270 }
271
272 ocibindbyname($this->stmt_id, $param['name'], $param['value'], $param['length'], $param['type']);
273 }
274 }
275
276 // --------------------------------------------------------------------
277
278 /**
279 * Begin Transaction
280 *
281 * @access public
282 * @return bool
283 */
284 function trans_begin($test_mode = FALSE)
285 {
Derek Jones0b59f272008-05-13 04:22:33 +0000286 if ( ! $this->trans_enabled)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000287 {
288 return TRUE;
289 }
290
291 // When transactions are nested we only begin/commit/rollback the outermost ones
292 if ($this->_trans_depth > 0)
293 {
294 return TRUE;
295 }
296
297 // Reset the transaction failure flag.
298 // If the $test_mode flag is set to TRUE transactions will be rolled back
299 // even if the queries produce a successful result.
300 $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
301
302 $this->_commit = OCI_DEFAULT;
303 return TRUE;
304 }
305
306 // --------------------------------------------------------------------
307
308 /**
309 * Commit Transaction
310 *
311 * @access public
312 * @return bool
313 */
314 function trans_commit()
315 {
Derek Jones0b59f272008-05-13 04:22:33 +0000316 if ( ! $this->trans_enabled)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000317 {
318 return TRUE;
319 }
320
321 // When transactions are nested we only begin/commit/rollback the outermost ones
322 if ($this->_trans_depth > 0)
323 {
324 return TRUE;
325 }
326
327 $ret = OCIcommit($this->conn_id);
328 $this->_commit = OCI_COMMIT_ON_SUCCESS;
329 return $ret;
330 }
331
332 // --------------------------------------------------------------------
333
334 /**
335 * Rollback Transaction
336 *
337 * @access public
338 * @return bool
339 */
340 function trans_rollback()
341 {
Derek Jones0b59f272008-05-13 04:22:33 +0000342 if ( ! $this->trans_enabled)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000343 {
344 return TRUE;
345 }
346
347 // When transactions are nested we only begin/commit/rollback the outermost ones
348 if ($this->_trans_depth > 0)
349 {
350 return TRUE;
351 }
352
353 $ret = OCIrollback($this->conn_id);
354 $this->_commit = OCI_COMMIT_ON_SUCCESS;
355 return $ret;
356 }
357
358 // --------------------------------------------------------------------
359
360 /**
361 * Escape String
362 *
363 * @access public
364 * @param string
365 * @return string
366 */
367 function escape_str($str)
368 {
Derek Jonesd16bab12008-09-24 18:22:03 +0000369 return $this->input->_remove_invisible_characters($str);
Derek Allardd2df9bc2007-04-15 17:41:17 +0000370 }
371
372 // --------------------------------------------------------------------
373
374 /**
375 * Affected Rows
376 *
377 * @access public
378 * @return integer
379 */
380 function affected_rows()
381 {
382 return @ocirowcount($this->stmt_id);
383 }
384
385 // --------------------------------------------------------------------
386
387 /**
388 * Insert ID
389 *
390 * @access public
391 * @return integer
392 */
393 function insert_id()
394 {
395 // not supported in oracle
Derek Allarddb708af2008-01-23 17:18:41 +0000396 return $this->display_error('db_unsupported_function');
Derek Allardd2df9bc2007-04-15 17:41:17 +0000397 }
398
399 // --------------------------------------------------------------------
400
401 /**
402 * "Count All" query
403 *
404 * Generates a platform-specific query string that counts all records in
405 * the specified database
406 *
407 * @access public
408 * @param string
409 * @return string
410 */
411 function count_all($table = '')
412 {
413 if ($table == '')
414 return '0';
415
Derek Allardf6cd45c2008-01-18 14:31:51 +0000416 $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows'). " FROM " . $this->_protect_identifiers($this->dbprefix.$table));
Derek Allardd2df9bc2007-04-15 17:41:17 +0000417
418 if ($query == FALSE)
419 {
420 return 0;
421 }
422
423 $row = $query->row();
424 return $row->NUMROWS;
425 }
426
427 // --------------------------------------------------------------------
428
429 /**
430 * Show table query
431 *
432 * Generates a platform-specific query string so that the table names can be fetched
433 *
434 * @access private
Derek Allard39b622d2008-01-16 21:10:09 +0000435 * @param boolean
Derek Allardd2df9bc2007-04-15 17:41:17 +0000436 * @return string
437 */
Derek Allard39b622d2008-01-16 21:10:09 +0000438 function _list_tables($prefix_limit = FALSE)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000439 {
Derek Allard39b622d2008-01-16 21:10:09 +0000440 $sql = "SELECT TABLE_NAME FROM ALL_TABLES";
441
442 if ($prefix_limit !== FALSE AND $this->dbprefix != '')
443 {
444 $sql .= " WHERE TABLE_NAME LIKE '".$this->dbprefix."%'";
445 }
446
447 return $sql;
Derek Allardd2df9bc2007-04-15 17:41:17 +0000448 }
449
450 // --------------------------------------------------------------------
451
452 /**
453 * Show column query
454 *
455 * Generates a platform-specific query string so that the column names can be fetched
456 *
457 * @access public
458 * @param string the table name
459 * @return string
460 */
461 function _list_columns($table = '')
462 {
463 return "SELECT COLUMN_NAME FROM all_tab_columns WHERE table_name = '$table'";
464 }
465
466 // --------------------------------------------------------------------
467
468 /**
469 * Field data query
470 *
471 * Generates a platform-specific query so that the column data can be retrieved
472 *
473 * @access public
474 * @param string the table name
475 * @return object
476 */
477 function _field_data($table)
478 {
479 return "SELECT * FROM ".$this->_escape_table($table)." where rownum = 1";
480 }
481
482 // --------------------------------------------------------------------
483
484 /**
485 * The error message string
486 *
487 * @access private
488 * @return string
489 */
490 function _error_message()
491 {
492 $error = ocierror($this->conn_id);
493 return $error['message'];
494 }
495
496 // --------------------------------------------------------------------
497
498 /**
499 * The error message number
500 *
501 * @access private
502 * @return integer
503 */
504 function _error_number()
505 {
506 $error = ocierror($this->conn_id);
507 return $error['code'];
508 }
Rick Ellis52dc8ca2008-09-30 19:53:52 +0000509
510 // --------------------------------------------------------------------
511
512 /**
513 * Escape Column Name
514 *
515 * This function adds backticks around supplied column name
516 *
517 * @access private
518 * @param string the column name
519 * @return string
520 */
521 function _escape_column($column)
522 {
523 // Probably not necessary with Oracle so we simply return the value
524 return $column;
525 }
Derek Allardd2df9bc2007-04-15 17:41:17 +0000526
527 // --------------------------------------------------------------------
528
529 /**
530 * Escape Table Name
531 *
532 * This function adds backticks if the table name has a period
533 * in it. Some DBs will get cranky unless periods are escaped
534 *
535 * @access private
536 * @param string the table name
537 * @return string
538 */
539 function _escape_table($table)
540 {
Derek Allardc0743382008-02-11 05:54:44 +0000541 if (strpos($table, '.') !== FALSE)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000542 {
Derek Allardc0743382008-02-11 05:54:44 +0000543 $table = '"' . str_replace('.', '"."', $table) . '"';
Derek Allardd2df9bc2007-04-15 17:41:17 +0000544 }
545
546 return $table;
547 }
548
549 // --------------------------------------------------------------------
550
551 /**
Derek Allard39b622d2008-01-16 21:10:09 +0000552 * Protect Identifiers
553 *
554 * This function adds backticks if appropriate based on db type
555 *
556 * @access private
557 * @param mixed the item to escape
558 * @param boolean only affect the first word
559 * @return mixed the item with backticks
560 */
561 function _protect_identifiers($item, $first_word_only = FALSE)
562 {
563 if (is_array($item))
564 {
565 $escaped_array = array();
566
567 foreach($item as $k=>$v)
568 {
569 $escaped_array[$this->_protect_identifiers($k)] = $this->_protect_identifiers($v, $first_word_only);
570 }
571
572 return $escaped_array;
573 }
574
575 // This function may get "item1 item2" as a string, and so
Derek Allard15648132008-02-10 21:46:18 +0000576 // we may need ""item1" "item2"" and not ""item1 item2""
Derek Allard61579382008-01-16 22:22:42 +0000577 if (ctype_alnum($item) === FALSE)
Derek Allard39b622d2008-01-16 21:10:09 +0000578 {
Derek Allard9b3e7b52008-02-04 23:20:34 +0000579 if (strpos($item, '.') !== FALSE)
580 {
581 $aliased_tables = implode(".",$this->ar_aliased_tables).'.';
582 $table_name = substr($item, 0, strpos($item, '.')+1);
583 $item = (strpos($aliased_tables, $table_name) !== FALSE) ? $item = $item : $this->dbprefix.$item;
584 }
585
Derek Allard15648132008-02-10 21:46:18 +0000586 // This function may get "field >= 1", and need it to return ""field" >= 1"
Derek Allard61579382008-01-16 22:22:42 +0000587 $lbound = ($first_word_only === TRUE) ? '' : '|\s|\(';
Derek Allard39b622d2008-01-16 21:10:09 +0000588
Derek Allard15648132008-02-10 21:46:18 +0000589 $item = preg_replace('/(^'.$lbound.')([\w\d\-\_]+?)(\s|\)|$)/iS', '$1"$2"$3', $item);
Derek Allard61579382008-01-16 22:22:42 +0000590 }
591 else
592 {
Derek Allard15648132008-02-10 21:46:18 +0000593 return "\"{$item}\"";
Derek Allard39b622d2008-01-16 21:10:09 +0000594 }
595
Derek Allard9a4d1da2008-02-25 14:18:38 +0000596 $exceptions = array('AS', '/', '-', '%', '+', '*', 'OR', 'IS');
Derek Allard39b622d2008-01-16 21:10:09 +0000597
598 foreach ($exceptions as $exception)
599 {
Derek Allard61579382008-01-16 22:22:42 +0000600
Derek Allard15648132008-02-10 21:46:18 +0000601 if (stristr($item, " \"{$exception}\" ") !== FALSE)
Derek Allard39b622d2008-01-16 21:10:09 +0000602 {
Derek Allard15648132008-02-10 21:46:18 +0000603 $item = preg_replace('/ "('.preg_quote($exception).')" /i', ' $1 ', $item);
Derek Allard39b622d2008-01-16 21:10:09 +0000604 }
605 }
Derek Allard39b622d2008-01-16 21:10:09 +0000606 return $item;
607 }
608
609 // --------------------------------------------------------------------
610
611 /**
Derek Jonesc6ad0232008-01-29 18:44:54 +0000612 * From Tables
613 *
614 * This function implicitly groups FROM tables so there is no confusion
615 * about operator precedence in harmony with SQL standards
616 *
617 * @access public
618 * @param type
619 * @return type
620 */
621 function _from_tables($tables)
622 {
Derek Jones0b59f272008-05-13 04:22:33 +0000623 if ( ! is_array($tables))
Derek Jonesc6ad0232008-01-29 18:44:54 +0000624 {
625 $tables = array($tables);
626 }
627
Derek Allard15648132008-02-10 21:46:18 +0000628 return implode(', ', $tables);
Derek Jonesc6ad0232008-01-29 18:44:54 +0000629 }
630
631 // --------------------------------------------------------------------
632
633 /**
Derek Allardd2df9bc2007-04-15 17:41:17 +0000634 * Insert statement
635 *
636 * Generates a platform-specific insert string from the supplied data
637 *
638 * @access public
639 * @param string the table name
640 * @param array the insert keys
641 * @param array the insert values
642 * @return string
643 */
644 function _insert($table, $keys, $values)
645 {
646 return "INSERT INTO ".$this->_escape_table($table)." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
647 }
648
649 // --------------------------------------------------------------------
650
651 /**
652 * Update statement
653 *
654 * Generates a platform-specific update string from the supplied data
655 *
Derek Allard39b622d2008-01-16 21:10:09 +0000656 * @access public
657 * @param string the table name
658 * @param array the update data
659 * @param array the where clause
660 * @param array the orderby clause
661 * @param array the limit clause
662 * @return string
Derek Allardd2df9bc2007-04-15 17:41:17 +0000663 */
Derek Allard39b622d2008-01-16 21:10:09 +0000664 function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000665 {
666 foreach($values as $key => $val)
667 {
668 $valstr[] = $key." = ".$val;
669 }
Derek Allardda6d2402007-12-19 14:49:29 +0000670
Derek Jones0b59f272008-05-13 04:22:33 +0000671 $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
Derek Allard39b622d2008-01-16 21:10:09 +0000672
673 $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
Derek Allardda6d2402007-12-19 14:49:29 +0000674
Derek Allard32cf7eb2008-02-05 16:03:50 +0000675 $sql = "UPDATE ".$this->_escape_table($table)." SET ".implode(', ', $valstr);
676 $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
677 $sql .= $orderby.$limit;
678
679 return $sql;
Derek Allardd2df9bc2007-04-15 17:41:17 +0000680 }
681
682 // --------------------------------------------------------------------
683
684 /**
Derek Allard39b622d2008-01-16 21:10:09 +0000685 * Truncate statement
686 *
687 * Generates a platform-specific truncate string from the supplied data
688 * If the database does not support the truncate() command
689 * This function maps to "DELETE FROM table"
690 *
691 * @access public
692 * @param string the table name
693 * @return string
694 */
695 function _truncate($table)
696 {
697 return "TRUNCATE TABLE ".$this->_escape_table($table);
698 }
699
700 // --------------------------------------------------------------------
701
702 /**
Derek Allardd2df9bc2007-04-15 17:41:17 +0000703 * Delete statement
704 *
705 * Generates a platform-specific delete string from the supplied data
706 *
Derek Allard39b622d2008-01-16 21:10:09 +0000707 * @access public
708 * @param string the table name
709 * @param array the where clause
710 * @param string the limit clause
711 * @return string
712 */
713 function _delete($table, $where = array(), $like = array(), $limit = FALSE)
Derek Allardd2df9bc2007-04-15 17:41:17 +0000714 {
Derek Allard39b622d2008-01-16 21:10:09 +0000715 $conditions = '';
716
Derek Jones0b59f272008-05-13 04:22:33 +0000717 if (count($where) > 0 OR count($like) > 0)
Derek Allard39b622d2008-01-16 21:10:09 +0000718 {
719 $conditions = "\nWHERE ";
720 $conditions .= implode("\n", $this->ar_where);
721
722 if (count($where) > 0 && count($like) > 0)
723 {
724 $conditions .= " AND ";
725 }
726 $conditions .= implode("\n", $like);
727 }
728
Derek Jones0b59f272008-05-13 04:22:33 +0000729 $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
Derek Allarde77d77c2007-12-19 15:01:55 +0000730
Derek Allard39b622d2008-01-16 21:10:09 +0000731 return "DELETE FROM ".$table.$conditions.$limit;
Derek Allardd2df9bc2007-04-15 17:41:17 +0000732 }
733
734 // --------------------------------------------------------------------
735
736 /**
737 * Limit string
738 *
739 * Generates a platform-specific LIMIT clause
740 *
741 * @access public
742 * @param string the sql query string
743 * @param integer the number of rows to limit the query to
744 * @param integer the offset value
745 * @return string
746 */
747 function _limit($sql, $limit, $offset)
748 {
749 $limit = $offset + $limit;
750 $newsql = "SELECT * FROM (select inner_query.*, rownum rnum FROM ($sql) inner_query WHERE rownum < $limit)";
751
752 if ($offset != 0)
753 {
754 $newsql .= " WHERE rnum >= $offset";
755 }
756
757 // remember that we used limits
758 $this->limit_used = TRUE;
759
760 return $newsql;
761 }
762
763 // --------------------------------------------------------------------
764
765 /**
766 * Close DB Connection
767 *
768 * @access public
769 * @param resource
770 * @return void
771 */
772 function _close($conn_id)
773 {
774 @ocilogoff($conn_id);
775 }
776
777
778}
779
780
Derek Jones0b59f272008-05-13 04:22:33 +0000781
782/* End of file oci8_driver.php */
Derek Jonesa3ffbbb2008-05-11 18:18:29 +0000783/* Location: ./system/database/drivers/oci8/oci8_driver.php */