From 48a2baf0e288accd206f5da5031d29076e130792 Mon Sep 17 00:00:00 2001 From: Alex Bilbie Date: Sat, 2 Jun 2012 11:09:54 +0100 Subject: Replaced `==` with `===` and `!=` with `!==` in /system/database --- system/database/drivers/sqlite3/sqlite3_driver.php | 2 +- system/database/drivers/sqlite3/sqlite3_forge.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'system/database/drivers/sqlite3') diff --git a/system/database/drivers/sqlite3/sqlite3_driver.php b/system/database/drivers/sqlite3/sqlite3_driver.php index ea4cf2d4f..ea7e6d43c 100644 --- a/system/database/drivers/sqlite3/sqlite3_driver.php +++ b/system/database/drivers/sqlite3/sqlite3_driver.php @@ -255,7 +255,7 @@ class CI_DB_sqlite3_driver extends CI_DB { protected function _list_tables($prefix_limit = FALSE) { return 'SELECT "NAME" FROM "SQLITE_MASTER" WHERE "TYPE" = \'table\'' - .(($prefix_limit !== FALSE && $this->dbprefix != '') + .(($prefix_limit !== FALSE && $this->dbprefix !== '') ? ' AND "NAME" LIKE \''.$this->escape_like_str($this->dbprefix).'%\' '.sprintf($this->_like_escape_str, $this->_like_escape_chr) : ''); } diff --git a/system/database/drivers/sqlite3/sqlite3_forge.php b/system/database/drivers/sqlite3/sqlite3_forge.php index 20f1e6f63..0a5dc9211 100644 --- a/system/database/drivers/sqlite3/sqlite3_forge.php +++ b/system/database/drivers/sqlite3/sqlite3_forge.php @@ -184,7 +184,7 @@ class CI_DB_sqlite3_forge extends CI_DB_forge { return 'ALTER TABLE '.$this->db->protect_identifiers($table).' '.$alter_type.' '.$this->db->protect_identifiers($column_name) .' '.$column_definition - .($default_value != '' ? ' DEFAULT '.$default_value : '') + .($default_value !== '' ? ' DEFAULT '.$default_value : '') // If NOT NULL is specified, the field must have a DEFAULT value other than NULL .(($null !== NULL && $default_value !== 'NULL') ? ' NOT NULL' : ' NULL'); } -- cgit v1.2.3-24-g4f1b