summaryrefslogtreecommitdiffstats
path: root/system/database/drivers/pdo/pdo_driver.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-06-03 17:36:45 +0200
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-06-03 17:36:45 +0200
commit142b618fb7419972288a8f7b58e7e2509b3bf225 (patch)
tree53566bfe94a12e7fb2e28ec4122dfa6732f25a64 /system/database/drivers/pdo/pdo_driver.php
parentdda21f6abc76451997b12c07e6066aa49c2d423d (diff)
parent0c5180bcfc996f32176f28895e9bd75be582c4fa (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/database/drivers/pdo/pdo_driver.php')
-rw-r--r--system/database/drivers/pdo/pdo_driver.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/system/database/drivers/pdo/pdo_driver.php b/system/database/drivers/pdo/pdo_driver.php
index ec7f3e19b..b4ad52a45 100644
--- a/system/database/drivers/pdo/pdo_driver.php
+++ b/system/database/drivers/pdo/pdo_driver.php
@@ -65,7 +65,7 @@ class CI_DB_pdo_driver extends CI_DB {
{
parent::__construct($params);
- if (preg_match('/([^;]+):/', $this->dsn, $match) && count($match) == 2)
+ if (preg_match('/([^;]+):/', $this->dsn, $match) && count($match) === 2)
{
// If there is a minimum valid dsn string pattern found, we're done
// This is for general PDO users, who tend to have a full DSN string.
@@ -418,12 +418,12 @@ class CI_DB_pdo_driver extends CI_DB {
*/
protected function _list_tables($prefix_limit = FALSE)
{
- if ($this->pdodriver == 'pgsql')
+ if ($this->pdodriver === 'pgsql')
{
// Analog function to show all tables in postgre
$sql = "SELECT * FROM information_schema.tables WHERE table_schema = 'public'";
}
- elseif ($this->pdodriver == 'sqlite')
+ elseif ($this->pdodriver === 'sqlite')
{
// Analog function to show all tables in sqlite
$sql = "SELECT name FROM sqlite_master WHERE type='table' AND name NOT LIKE 'sqlite_%'";
@@ -433,7 +433,7 @@ class CI_DB_pdo_driver extends CI_DB {
$sql = 'SHOW TABLES FROM '.$this->escape_identifiers($this->database);
}
- if ($prefix_limit !== FALSE AND $this->dbprefix != '')
+ if ($prefix_limit !== FALSE AND $this->dbprefix !== '')
{
return FALSE;
}
@@ -468,17 +468,17 @@ class CI_DB_pdo_driver extends CI_DB {
*/
protected function _field_data($table)
{
- if ($this->pdodriver == 'mysql' or $this->pdodriver == 'pgsql')
+ if ($this->pdodriver === 'mysql' or $this->pdodriver === 'pgsql')
{
// Analog function for mysql and postgre
return 'SELECT * FROM '.$this->escape_identifiers($table).' LIMIT 1';
}
- elseif ($this->pdodriver == 'oci')
+ elseif ($this->pdodriver === 'oci')
{
// Analog function for oci
return 'SELECT * FROM '.$this->escape_identifiers($table).' WHERE ROWNUM <= 1';
}
- elseif ($this->pdodriver == 'sqlite')
+ elseif ($this->pdodriver === 'sqlite')
{
// Analog function for sqlite
return 'PRAGMA table_info('.$this->escape_identifiers($table).')';
@@ -552,7 +552,7 @@ class CI_DB_pdo_driver extends CI_DB {
protected function _update_batch($table, $values, $index, $where = NULL)
{
$ids = array();
- $where = ($where != '' && count($where) >=1) ? implode(" ", $where).' AND ' : '';
+ $where = ($where !== '' && count($where) >=1) ? implode(" ", $where).' AND ' : '';
foreach ($values as $key => $val)
{
@@ -560,7 +560,7 @@ class CI_DB_pdo_driver extends CI_DB {
foreach (array_keys($val) as $field)
{
- if ($field != $index)
+ if ($field !== $index)
{
$final[$field][] = 'WHEN '.$index.' = '.$val[$index].' THEN '.$val[$field];
}
@@ -620,7 +620,7 @@ class CI_DB_pdo_driver extends CI_DB {
*/
protected function _limit($sql, $limit, $offset)
{
- if ($this->pdodriver == 'cubrid' OR $this->pdodriver == 'sqlite')
+ if ($this->pdodriver === 'cubrid' OR $this->pdodriver === 'sqlite')
{
$offset = ($offset == 0) ? '' : $offset.', ';