phpBB

Code Changes

File: includes/db/sqlite.php

  Unmodified   Added   Modified   Removed
Line 25Line 25
*/
class dbal_sqlite extends dbal
{

*/
class dbal_sqlite extends dbal
{

 
	var $connect_error = '';


	/**
* Connect to server
*/

	/**
* Connect to server
*/

Line 36Line 38
		$this->dbname = $database;

$error = '';

		$this->dbname = $database;

$error = '';

		$this->db_connect_id = ($this->persistency) ? @sqlite_popen($this->server, 0666, $error) : @sqlite_open($this->server, 0666, $error);


















		if ($this->persistency)
{
if (!function_exists('sqlite_popen'))
{
$this->connect_error = 'sqlite_popen function does not exist, is sqlite extension installed?';
return $this->sql_error('');
}
$this->db_connect_id = @sqlite_popen($this->server, 0666, $error);
}
else
{
if (!function_exists('sqlite_open'))
{
$this->connect_error = 'sqlite_open function does not exist, is sqlite extension installed?';
return $this->sql_error('');
}
$this->db_connect_id = @sqlite_open($this->server, 0666, $error);
}


if ($this->db_connect_id)
{


if ($this->db_connect_id)
{

Line 281Line 300
	*/
function _sql_error()
{

	*/
function _sql_error()
{

		return array(



		if (function_exists('sqlite_error_string'))
{
$error = array(

			'message'	=> @sqlite_error_string(@sqlite_last_error($this->db_connect_id)),

			'message'	=> @sqlite_error_string(@sqlite_last_error($this->db_connect_id)),

			'code'		=> @sqlite_last_error($this->db_connect_id)

				'code'		=> @sqlite_last_error($this->db_connect_id),

		);

		);

 
		}
else
{
$error = array(
'message' => $this->connect_error,
'code' => '',
);
}

return $error;

	}

/**

	}

/**