summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/sqlite
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
committerDerek Jones <derek.jones@ellislab.com>2008-05-13 06:22:33 +0200
commit0b59f270a432f8c7b6128981f0a39b4a2e2fbd34 (patch)
tree1e7655eabd76bb981692f5d4f21cb1fc7be3e9cd /system/database/drivers/sqlite
parent5cf664748ee295867f593d7eb7991bd35fe8eca6 (diff)
Some sweeping syntax changes for consistency:
(! foo) changed to ( ! foo) || changed to OR changed newline standardization code in various places from preg_replace to str_replace
Diffstat (limited to 'system/database/drivers/sqlite')
-rw-r--r--system/database/drivers/sqlite/sqlite_driver.php24
-rw-r--r--system/database/drivers/sqlite/sqlite_forge.php8
-rw-r--r--system/database/drivers/sqlite/sqlite_result.php6
-rw-r--r--system/database/drivers/sqlite/sqlite_utility.php8
4 files changed, 23 insertions, 23 deletions
diff --git a/system/database/drivers/sqlite/sqlite_driver.php b/system/database/drivers/sqlite/sqlite_driver.php
index cb53ad91a..b323e4154 100644
--- a/system/database/drivers/sqlite/sqlite_driver.php
+++ b/system/database/drivers/sqlite/sqlite_driver.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -48,7 +48,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function db_connect()
{
- if (! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
+ if ( ! $conn_id = @sqlite_open($this->database, FILE_WRITE_MODE, $error))
{
log_message('error', $error);
@@ -73,7 +73,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function db_pconnect()
{
- if (! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
+ if ( ! $conn_id = @sqlite_popen($this->database, FILE_WRITE_MODE, $error))
{
log_message('error', $error);
@@ -171,7 +171,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_begin($test_mode = FALSE)
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -201,7 +201,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_commit()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -226,7 +226,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function trans_rollback()
{
- if (! $this->trans_enabled)
+ if ( ! $this->trans_enabled)
{
return TRUE;
}
@@ -482,7 +482,7 @@ class CI_DB_sqlite_driver extends CI_DB {
*/
function _from_tables($tables)
{
- if (! is_array($tables))
+ if ( ! is_array($tables))
{
$tables = array($tables);
}
@@ -530,7 +530,7 @@ class CI_DB_sqlite_driver extends CI_DB {
$valstr[] = $key." = ".$val;
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
$orderby = (count($orderby) >= 1)?' ORDER BY '.implode(", ", $orderby):'';
@@ -577,7 +577,7 @@ class CI_DB_sqlite_driver extends CI_DB {
{
$conditions = '';
- if (count($where) > 0 || count($like) > 0)
+ if (count($where) > 0 OR count($like) > 0)
{
$conditions = "\nWHERE ";
$conditions .= implode("\n", $this->ar_where);
@@ -589,7 +589,7 @@ class CI_DB_sqlite_driver extends CI_DB {
$conditions .= implode("\n", $like);
}
- $limit = (!$limit) ? '' : ' LIMIT '.$limit;
+ $limit = ( ! $limit) ? '' : ' LIMIT '.$limit;
return "DELETE FROM ".$table.$conditions.$limit;
}
@@ -656,6 +656,6 @@ class CI_DB_sqlite_driver extends CI_DB {
}
-
-/* End of file sqlite_driver.php */
+
+/* End of file sqlite_driver.php */
/* Location: ./system/database/drivers/sqlite/sqlite_driver.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_forge.php b/system/database/drivers/sqlite/sqlite_forge.php
index 8a1a4da01..25c74a731 100644
--- a/system/database/drivers/sqlite/sqlite_forge.php
+++ b/system/database/drivers/sqlite/sqlite_forge.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -49,7 +49,7 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
*/
function _drop_database($name)
{
- if (! @file_exists($this->db->database) OR ! @unlink($this->db->database))
+ if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
{
if ($this->db->db_debug)
{
@@ -231,6 +231,6 @@ class CI_DB_sqlite_forge extends CI_DB_forge {
}
}
-
-/* End of file sqlite_forge.php */
+
+/* End of file sqlite_forge.php */
/* Location: ./system/database/drivers/sqlite/sqlite_forge.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php
index 72c93fd48..8bb0d9d0b 100644
--- a/system/database/drivers/sqlite/sqlite_result.php
+++ b/system/database/drivers/sqlite/sqlite_result.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -180,6 +180,6 @@ class CI_DB_sqlite_result extends CI_DB_result {
}
-
-/* End of file sqlite_result.php */
+
+/* End of file sqlite_result.php */
/* Location: ./system/database/drivers/sqlite/sqlite_result.php */ \ No newline at end of file
diff --git a/system/database/drivers/sqlite/sqlite_utility.php b/system/database/drivers/sqlite/sqlite_utility.php
index c85e36575..fff24a715 100644
--- a/system/database/drivers/sqlite/sqlite_utility.php
+++ b/system/database/drivers/sqlite/sqlite_utility.php
@@ -1,4 +1,4 @@
-<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
+<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* CodeIgniter
*
@@ -124,7 +124,7 @@ class CI_DB_sqlite_utility extends CI_DB_utility {
*/
function _drop_database($name)
{
- if (! @file_exists($this->db->database) OR ! @unlink($this->db->database))
+ if ( ! @file_exists($this->db->database) OR ! @unlink($this->db->database))
{
if ($this->db->db_debug)
{
@@ -136,6 +136,6 @@ class CI_DB_sqlite_utility extends CI_DB_utility {
}
}
-
-/* End of file sqlite_utility.php */
+
+/* End of file sqlite_utility.php */
/* Location: ./system/database/drivers/sqlite/sqlite_utility.php */ \ No newline at end of file