blob: 3a7b7c673d6543185b8a01a85a89e17600ea4a33 [file] [log] [blame]
Derek Jones4b9c6292011-07-01 17:40:48 -05001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Derek Allard2067d1a2008-11-13 22:59:24 +00002/**
3 * CodeIgniter
4 *
Greg Aker741de1c2010-11-10 14:52:57 -06005 * An open source application development framework for PHP 5.1.6 or newer
Derek Allard2067d1a2008-11-13 22:59:24 +00006 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05007 * NOTICE OF LICENSE
8 *
9 * Licensed under the Open Software License version 3.0
10 *
11 * This source file is subject to the Open Software License (OSL 3.0) that is
12 * bundled with this package in the files license.txt / license.rst. It is
13 * also available through the world wide web at this URL:
14 * http://opensource.org/licenses/OSL-3.0
15 * If you did not receive a copy of the license and are unable to obtain it
16 * through the world wide web, please send an email to
17 * licensing@ellislab.com so we can send you a copy immediately.
18 *
Derek Allard2067d1a2008-11-13 22:59:24 +000019 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Derek Allard2067d1a2008-11-13 22:59:24 +000023 * @link http://codeigniter.com
24 * @since Version 1.0
25 * @filesource
26 */
27
28// ------------------------------------------------------------------------
29
30
31
32/**
33 * SQLite Database Adapter Class
34 *
35 * Note: _DB is an extender class that the app controller
Jamie Rumbelow7efad202012-02-19 12:37:00 +000036 * creates dynamically based on whether the query builder
Derek Allard2067d1a2008-11-13 22:59:24 +000037 * class is being used or not.
38 *
39 * @package CodeIgniter
40 * @subpackage Drivers
41 * @category Database
Derek Jonesf4a4bd82011-10-20 12:18:42 -050042 * @author EllisLab Dev Team
Derek Allard2067d1a2008-11-13 22:59:24 +000043 * @link http://codeigniter.com/user_guide/database/
44 */
45class CI_DB_sqlite_driver extends CI_DB {
46
47 var $dbdriver = 'sqlite';
Barry Mienydd671972010-10-04 16:33:58 +020048
Derek Allard2067d1a2008-11-13 22:59:24 +000049 // The character used to escape with - not needed for SQLite
50 var $_escape_char = '';
51
Derek Jonese4ed5832009-02-20 21:44:59 +000052 // clause and character used for LIKE escape sequences
Barry Mienydd671972010-10-04 16:33:58 +020053 var $_like_escape_str = " ESCAPE '%s' ";
Derek Jonese4ed5832009-02-20 21:44:59 +000054 var $_like_escape_chr = '!';
Barry Mienydd671972010-10-04 16:33:58 +020055
Derek Allard2067d1a2008-11-13 22:59:24 +000056 /**
57 * The syntax to count rows is slightly different across different
58 * database engines, so this string appears in each driver and is
59 * used for the count_all() and count_all_results() functions.
60 */
61 var $_count_string = "SELECT COUNT(*) AS ";
62 var $_random_keyword = ' Random()'; // database specific random keyword
63
64 /**
65 * Non-persistent database connection
66 *
67 * @access private called by the base class
68 * @return resource
Barry Mienydd671972010-10-04 16:33:58 +020069 */
Derek Allard2067d1a2008-11-13 22:59:24 +000070 function db_connect()
71 {
72 if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
73 {
74 log_message('error', $error);
Barry Mienydd671972010-10-04 16:33:58 +020075
Derek Allard2067d1a2008-11-13 22:59:24 +000076 if ($this->db_debug)
77 {
Derek Allardfac8fbc2010-02-05 16:14:49 +000078 $this->display_error($error, '', TRUE);
Derek Allard2067d1a2008-11-13 22:59:24 +000079 }
Barry Mienydd671972010-10-04 16:33:58 +020080
Derek Allard2067d1a2008-11-13 22:59:24 +000081 return FALSE;
82 }
Barry Mienydd671972010-10-04 16:33:58 +020083
Derek Allard2067d1a2008-11-13 22:59:24 +000084 return $conn_id;
85 }
Barry Mienydd671972010-10-04 16:33:58 +020086
Derek Allard2067d1a2008-11-13 22:59:24 +000087 // --------------------------------------------------------------------
88
89 /**
90 * Persistent database connection
91 *
92 * @access private called by the base class
93 * @return resource
Barry Mienydd671972010-10-04 16:33:58 +020094 */
Derek Allard2067d1a2008-11-13 22:59:24 +000095 function db_pconnect()
96 {
97 if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
98 {
99 log_message('error', $error);
Barry Mienydd671972010-10-04 16:33:58 +0200100
Derek Allard2067d1a2008-11-13 22:59:24 +0000101 if ($this->db_debug)
102 {
Derek Allardfac8fbc2010-02-05 16:14:49 +0000103 $this->display_error($error, '', TRUE);
Derek Allard2067d1a2008-11-13 22:59:24 +0000104 }
Barry Mienydd671972010-10-04 16:33:58 +0200105
Derek Allard2067d1a2008-11-13 22:59:24 +0000106 return FALSE;
107 }
Barry Mienydd671972010-10-04 16:33:58 +0200108
Derek Allard2067d1a2008-11-13 22:59:24 +0000109 return $conn_id;
110 }
Barry Mienydd671972010-10-04 16:33:58 +0200111
Derek Allard2067d1a2008-11-13 22:59:24 +0000112 // --------------------------------------------------------------------
113
114 /**
Derek Jones87cbafc2009-02-27 16:29:59 +0000115 * Reconnect
116 *
117 * Keep / reestablish the db connection if no queries have been
118 * sent for a length of time exceeding the server's idle timeout
119 *
120 * @access public
121 * @return void
122 */
123 function reconnect()
124 {
125 // not implemented in SQLite
126 }
127
128 // --------------------------------------------------------------------
129
130 /**
Derek Allard2067d1a2008-11-13 22:59:24 +0000131 * Select the database
132 *
133 * @access private called by the base class
134 * @return resource
Barry Mienydd671972010-10-04 16:33:58 +0200135 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000136 function db_select()
137 {
138 return TRUE;
139 }
140
141 // --------------------------------------------------------------------
142
143 /**
144 * Set client character set
145 *
146 * @access public
147 * @param string
148 * @param string
149 * @return resource
150 */
151 function db_set_charset($charset, $collation)
152 {
153 // @todo - add support if needed
154 return TRUE;
155 }
156
157 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200158
Derek Allard2067d1a2008-11-13 22:59:24 +0000159 /**
160 * Version number query string
161 *
162 * @access public
163 * @return string
164 */
165 function _version()
166 {
167 return sqlite_libversion();
168 }
Barry Mienydd671972010-10-04 16:33:58 +0200169
Derek Allard2067d1a2008-11-13 22:59:24 +0000170 // --------------------------------------------------------------------
171
172 /**
173 * Execute the query
174 *
175 * @access private called by the base class
176 * @param string an SQL query
177 * @return resource
Barry Mienydd671972010-10-04 16:33:58 +0200178 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000179 function _execute($sql)
180 {
181 $sql = $this->_prep_query($sql);
182 return @sqlite_query($this->conn_id, $sql);
183 }
Barry Mienydd671972010-10-04 16:33:58 +0200184
Derek Allard2067d1a2008-11-13 22:59:24 +0000185 // --------------------------------------------------------------------
186
187 /**
188 * Prep the query
189 *
190 * If needed, each database adapter can prep the query string
191 *
192 * @access private called by execute()
193 * @param string an SQL query
194 * @return string
Barry Mienydd671972010-10-04 16:33:58 +0200195 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000196 function _prep_query($sql)
197 {
198 return $sql;
199 }
200
201 // --------------------------------------------------------------------
202
203 /**
204 * Begin Transaction
205 *
206 * @access public
Barry Mienydd671972010-10-04 16:33:58 +0200207 * @return bool
208 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000209 function trans_begin($test_mode = FALSE)
210 {
211 if ( ! $this->trans_enabled)
212 {
213 return TRUE;
214 }
Barry Mienydd671972010-10-04 16:33:58 +0200215
Derek Allard2067d1a2008-11-13 22:59:24 +0000216 // When transactions are nested we only begin/commit/rollback the outermost ones
217 if ($this->_trans_depth > 0)
218 {
219 return TRUE;
220 }
221
222 // Reset the transaction failure flag.
223 // If the $test_mode flag is set to TRUE transactions will be rolled back
224 // even if the queries produce a successful result.
225 $this->_trans_failure = ($test_mode === TRUE) ? TRUE : FALSE;
226
227 $this->simple_query('BEGIN TRANSACTION');
228 return TRUE;
229 }
230
231 // --------------------------------------------------------------------
232
233 /**
234 * Commit Transaction
235 *
236 * @access public
Barry Mienydd671972010-10-04 16:33:58 +0200237 * @return bool
238 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000239 function trans_commit()
240 {
241 if ( ! $this->trans_enabled)
242 {
243 return TRUE;
244 }
245
246 // When transactions are nested we only begin/commit/rollback the outermost ones
247 if ($this->_trans_depth > 0)
248 {
249 return TRUE;
250 }
251
252 $this->simple_query('COMMIT');
253 return TRUE;
254 }
255
256 // --------------------------------------------------------------------
257
258 /**
259 * Rollback Transaction
260 *
261 * @access public
Barry Mienydd671972010-10-04 16:33:58 +0200262 * @return bool
263 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000264 function trans_rollback()
265 {
266 if ( ! $this->trans_enabled)
267 {
268 return TRUE;
269 }
270
271 // When transactions are nested we only begin/commit/rollback the outermost ones
272 if ($this->_trans_depth > 0)
273 {
274 return TRUE;
275 }
276
277 $this->simple_query('ROLLBACK');
278 return TRUE;
279 }
Barry Mienydd671972010-10-04 16:33:58 +0200280
Derek Allard2067d1a2008-11-13 22:59:24 +0000281 // --------------------------------------------------------------------
282
283 /**
284 * Escape String
285 *
286 * @access public
287 * @param string
Derek Jonese4ed5832009-02-20 21:44:59 +0000288 * @param bool whether or not the string will be used in a LIKE condition
Derek Allard2067d1a2008-11-13 22:59:24 +0000289 * @return string
290 */
Derek Jonese4ed5832009-02-20 21:44:59 +0000291 function escape_str($str, $like = FALSE)
Derek Allard2067d1a2008-11-13 22:59:24 +0000292 {
Derek Jonese4ed5832009-02-20 21:44:59 +0000293 if (is_array($str))
294 {
Pascal Krietec3a4a8d2011-02-14 13:40:08 -0500295 foreach ($str as $key => $val)
Barry Mienydd671972010-10-04 16:33:58 +0200296 {
Derek Jonese4ed5832009-02-20 21:44:59 +0000297 $str[$key] = $this->escape_str($val, $like);
Barry Mienydd671972010-10-04 16:33:58 +0200298 }
299
300 return $str;
301 }
302
Derek Jonese4ed5832009-02-20 21:44:59 +0000303 $str = sqlite_escape_string($str);
Barry Mienydd671972010-10-04 16:33:58 +0200304
Derek Jonese4ed5832009-02-20 21:44:59 +0000305 // escape LIKE condition wildcards
306 if ($like === TRUE)
307 {
308 $str = str_replace( array('%', '_', $this->_like_escape_chr),
309 array($this->_like_escape_chr.'%', $this->_like_escape_chr.'_', $this->_like_escape_chr.$this->_like_escape_chr),
310 $str);
311 }
Barry Mienydd671972010-10-04 16:33:58 +0200312
Derek Jonese4ed5832009-02-20 21:44:59 +0000313 return $str;
Derek Allard2067d1a2008-11-13 22:59:24 +0000314 }
Barry Mienydd671972010-10-04 16:33:58 +0200315
Derek Allard2067d1a2008-11-13 22:59:24 +0000316 // --------------------------------------------------------------------
317
318 /**
319 * Affected Rows
320 *
321 * @access public
322 * @return integer
323 */
324 function affected_rows()
325 {
326 return sqlite_changes($this->conn_id);
327 }
Barry Mienydd671972010-10-04 16:33:58 +0200328
Derek Allard2067d1a2008-11-13 22:59:24 +0000329 // --------------------------------------------------------------------
330
331 /**
332 * Insert ID
333 *
334 * @access public
335 * @return integer
336 */
337 function insert_id()
338 {
339 return @sqlite_last_insert_rowid($this->conn_id);
340 }
341
342 // --------------------------------------------------------------------
343
344 /**
345 * "Count All" query
346 *
347 * Generates a platform-specific query string that counts all records in
348 * the specified database
349 *
350 * @access public
351 * @param string
352 * @return string
353 */
354 function count_all($table = '')
355 {
356 if ($table == '')
Derek Allarde37ab382009-02-03 16:13:57 +0000357 {
358 return 0;
359 }
360
361 $query = $this->query($this->_count_string . $this->_protect_identifiers('numrows') . " FROM " . $this->_protect_identifiers($table, TRUE, NULL, FALSE));
Barry Mienydd671972010-10-04 16:33:58 +0200362
Derek Allard2067d1a2008-11-13 22:59:24 +0000363 if ($query->num_rows() == 0)
Derek Allarde37ab382009-02-03 16:13:57 +0000364 {
365 return 0;
366 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000367
368 $row = $query->row();
Greg Aker90248ab2011-08-20 14:23:14 -0500369 $this->_reset_select();
Derek Allarde37ab382009-02-03 16:13:57 +0000370 return (int) $row->numrows;
Derek Allard2067d1a2008-11-13 22:59:24 +0000371 }
372
373 // --------------------------------------------------------------------
374
375 /**
376 * List table query
377 *
378 * Generates a platform-specific query string so that the table names can be fetched
379 *
380 * @access private
381 * @param boolean
382 * @return string
383 */
384 function _list_tables($prefix_limit = FALSE)
385 {
386 $sql = "SELECT name from sqlite_master WHERE type='table'";
387
388 if ($prefix_limit !== FALSE AND $this->dbprefix != '')
389 {
Greg Aker0d424892010-01-26 02:14:44 +0000390 $sql .= " AND 'name' LIKE '".$this->escape_like_str($this->dbprefix)."%' ".sprintf($this->_like_escape_str, $this->_like_escape_chr);
Derek Allard2067d1a2008-11-13 22:59:24 +0000391 }
392 return $sql;
393 }
394
395 // --------------------------------------------------------------------
396
397 /**
398 * Show column query
399 *
400 * Generates a platform-specific query string so that the column names can be fetched
401 *
402 * @access public
403 * @param string the table name
404 * @return string
405 */
406 function _list_columns($table = '')
407 {
408 // Not supported
409 return FALSE;
410 }
411
412 // --------------------------------------------------------------------
413
414 /**
415 * Field data query
416 *
417 * Generates a platform-specific query so that the column data can be retrieved
418 *
419 * @access public
420 * @param string the table name
421 * @return object
422 */
423 function _field_data($table)
424 {
425 return "SELECT * FROM ".$table." LIMIT 1";
426 }
427
428 // --------------------------------------------------------------------
429
430 /**
431 * The error message string
432 *
433 * @access private
434 * @return string
435 */
436 function _error_message()
437 {
438 return sqlite_error_string(sqlite_last_error($this->conn_id));
439 }
Barry Mienydd671972010-10-04 16:33:58 +0200440
Derek Allard2067d1a2008-11-13 22:59:24 +0000441 // --------------------------------------------------------------------
442
443 /**
444 * The error message number
445 *
446 * @access private
447 * @return integer
448 */
449 function _error_number()
450 {
451 return sqlite_last_error($this->conn_id);
452 }
453
454 // --------------------------------------------------------------------
455
456 /**
457 * Escape the SQL Identifiers
458 *
459 * This function escapes column and table names
460 *
461 * @access private
462 * @param string
463 * @return string
464 */
465 function _escape_identifiers($item)
466 {
467 if ($this->_escape_char == '')
468 {
469 return $item;
470 }
471
472 foreach ($this->_reserved_identifiers as $id)
473 {
474 if (strpos($item, '.'.$id) !== FALSE)
475 {
Barry Mienydd671972010-10-04 16:33:58 +0200476 $str = $this->_escape_char. str_replace('.', $this->_escape_char.'.', $item);
477
Derek Allard2067d1a2008-11-13 22:59:24 +0000478 // remove duplicates if the user already included the escape
479 return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
Barry Mienydd671972010-10-04 16:33:58 +0200480 }
Derek Allard2067d1a2008-11-13 22:59:24 +0000481 }
Barry Mienydd671972010-10-04 16:33:58 +0200482
Derek Allard2067d1a2008-11-13 22:59:24 +0000483 if (strpos($item, '.') !== FALSE)
484 {
Barry Mienydd671972010-10-04 16:33:58 +0200485 $str = $this->_escape_char.str_replace('.', $this->_escape_char.'.'.$this->_escape_char, $item).$this->_escape_char;
Derek Allard2067d1a2008-11-13 22:59:24 +0000486 }
487 else
488 {
489 $str = $this->_escape_char.$item.$this->_escape_char;
490 }
Barry Mienydd671972010-10-04 16:33:58 +0200491
Derek Allard2067d1a2008-11-13 22:59:24 +0000492 // remove duplicates if the user already included the escape
493 return preg_replace('/['.$this->_escape_char.']+/', $this->_escape_char, $str);
494 }
Barry Mienydd671972010-10-04 16:33:58 +0200495
Derek Allard2067d1a2008-11-13 22:59:24 +0000496 // --------------------------------------------------------------------
497
498 /**
499 * From Tables
500 *
501 * This function implicitly groups FROM tables so there is no confusion
502 * about operator precedence in harmony with SQL standards
503 *
504 * @access public
505 * @param type
506 * @return type
507 */
508 function _from_tables($tables)
509 {
510 if ( ! is_array($tables))
511 {
512 $tables = array($tables);
513 }
Barry Mienydd671972010-10-04 16:33:58 +0200514
Derek Allard2067d1a2008-11-13 22:59:24 +0000515 return '('.implode(', ', $tables).')';
516 }
517
518 // --------------------------------------------------------------------
Barry Mienydd671972010-10-04 16:33:58 +0200519
Derek Allard2067d1a2008-11-13 22:59:24 +0000520 /**
521 * Insert statement
522 *
523 * Generates a platform-specific insert string from the supplied data
524 *
525 * @access public
526 * @param string the table name
527 * @param array the insert keys
528 * @param array the insert values
529 * @return string
530 */
531 function _insert($table, $keys, $values)
Barry Mienydd671972010-10-04 16:33:58 +0200532 {
Derek Allard2067d1a2008-11-13 22:59:24 +0000533 return "INSERT INTO ".$table." (".implode(', ', $keys).") VALUES (".implode(', ', $values).")";
534 }
Barry Mienydd671972010-10-04 16:33:58 +0200535
Derek Allard2067d1a2008-11-13 22:59:24 +0000536 // --------------------------------------------------------------------
537
538 /**
539 * Update statement
540 *
541 * Generates a platform-specific update string from the supplied data
542 *
543 * @access public
544 * @param string the table name
545 * @param array the update data
546 * @param array the where clause
547 * @param array the orderby clause
548 * @param array the limit clause
549 * @return string
550 */
551 function _update($table, $values, $where, $orderby = array(), $limit = FALSE)
552 {
Pascal Krietec3a4a8d2011-02-14 13:40:08 -0500553 foreach ($values as $key => $val)
Derek Allard2067d1a2008-11-13 22:59:24 +0000554 {
555 $valstr[] = $key." = ".$val;
556 }
Barry Mienydd671972010-10-04 16:33:58 +0200557
Derek Allard2067d1a2008-11-13 22:59:24 +0000558 $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
Barry Mienydd671972010-10-04 16:33:58 +0200559
Derek Allard2067d1a2008-11-13 22:59:24 +0000560 $orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
Barry Mienydd671972010-10-04 16:33:58 +0200561
Derek Allard2067d1a2008-11-13 22:59:24 +0000562 $sql = "UPDATE ".$table." SET ".implode(', ', $valstr);
563
564 $sql .= ($where != '' AND count($where) >=1) ? " WHERE ".implode(" ", $where) : '';
565
566 $sql .= $orderby.$limit;
Barry Mienydd671972010-10-04 16:33:58 +0200567
Derek Allard2067d1a2008-11-13 22:59:24 +0000568 return $sql;
569 }
570
Barry Mienydd671972010-10-04 16:33:58 +0200571
Derek Allard2067d1a2008-11-13 22:59:24 +0000572 // --------------------------------------------------------------------
573
574 /**
575 * Truncate statement
576 *
577 * Generates a platform-specific truncate string from the supplied data
578 * If the database does not support the truncate() command
579 * This function maps to "DELETE FROM table"
580 *
581 * @access public
582 * @param string the table name
583 * @return string
Barry Mienydd671972010-10-04 16:33:58 +0200584 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000585 function _truncate($table)
586 {
587 return $this->_delete($table);
588 }
Barry Mienydd671972010-10-04 16:33:58 +0200589
Derek Allard2067d1a2008-11-13 22:59:24 +0000590 // --------------------------------------------------------------------
591
592 /**
593 * Delete statement
594 *
595 * Generates a platform-specific delete string from the supplied data
596 *
597 * @access public
598 * @param string the table name
599 * @param array the where clause
600 * @param string the limit clause
601 * @return string
Barry Mienydd671972010-10-04 16:33:58 +0200602 */
Derek Allard2067d1a2008-11-13 22:59:24 +0000603 function _delete($table, $where = array(), $like = array(), $limit = FALSE)
604 {
605 $conditions = '';
606
607 if (count($where) > 0 OR count($like) > 0)
608 {
609 $conditions = "\nWHERE ";
Jamie Rumbelow7efad202012-02-19 12:37:00 +0000610 $conditions .= implode("\n", $this->qb_where);
Derek Allard2067d1a2008-11-13 22:59:24 +0000611
612 if (count($where) > 0 && count($like) > 0)
613 {
614 $conditions .= " AND ";
615 }
616 $conditions .= implode("\n", $like);
617 }
618
619 $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
Barry Mienydd671972010-10-04 16:33:58 +0200620
Derek Allard2067d1a2008-11-13 22:59:24 +0000621 return "DELETE FROM ".$table.$conditions.$limit;
622 }
Barry Mienydd671972010-10-04 16:33:58 +0200623
Derek Allard2067d1a2008-11-13 22:59:24 +0000624 // --------------------------------------------------------------------
625
626 /**
627 * Limit string
628 *
629 * Generates a platform-specific LIMIT clause
630 *
631 * @access public
632 * @param string the sql query string
633 * @param integer the number of rows to limit the query to
634 * @param integer the offset value
635 * @return string
636 */
637 function _limit($sql, $limit, $offset)
Barry Mienydd671972010-10-04 16:33:58 +0200638 {
Derek Allard2067d1a2008-11-13 22:59:24 +0000639 if ($offset == 0)
640 {
641 $offset = '';
642 }
643 else
644 {
645 $offset .= ", ";
646 }
Barry Mienydd671972010-10-04 16:33:58 +0200647
Derek Allard2067d1a2008-11-13 22:59:24 +0000648 return $sql."LIMIT ".$offset.$limit;
649 }
650
651 // --------------------------------------------------------------------
652
653 /**
654 * Close DB Connection
655 *
656 * @access public
657 * @param resource
658 * @return void
659 */
660 function _close($conn_id)
661 {
662 @sqlite_close($conn_id);
663 }
664
665
666}
667
668
669/* End of file sqlite_driver.php */
Derek Jonesa3ffbbb2008-05-11 18:18:29 +0000670/* Location: ./system/database/drivers/sqlite/sqlite_driver.php */