diff options
Diffstat (limited to 'system/database/DB_active_rec.php')
-rw-r--r-- | system/database/DB_active_rec.php | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php index 6f50c110d..1820bd202 100644 --- a/system/database/DB_active_rec.php +++ b/system/database/DB_active_rec.php @@ -315,7 +315,7 @@ class CI_DB_active_record extends CI_DB_driver { {
$type = strtoupper(trim($type));
- if ( ! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
+ if (! in_array($type, array('LEFT', 'RIGHT', 'OUTER', 'INNER', 'LEFT OUTER', 'RIGHT OUTER'), TRUE))
{
$type = '';
}
@@ -411,7 +411,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function _where($key, $value = NULL, $type = 'AND ', $escape = TRUE)
{
- if ( ! is_array($key))
+ if (! is_array($key))
{
$key = array($key => $value);
}
@@ -420,13 +420,13 @@ class CI_DB_active_record extends CI_DB_driver { {
$prefix = (count($this->ar_where) == 0) ? '' : $type;
- if ( ! $this->_has_operator($k) && is_null($key[$k]))
+ if (! $this->_has_operator($k) && is_null($key[$k]))
{
// value appears not to have been set, assign the test to IS NULL
$k .= ' IS NULL';
}
- if ( ! is_null($v))
+ if (! is_null($v))
{
if ($escape === TRUE)
@@ -442,7 +442,7 @@ class CI_DB_active_record extends CI_DB_driver { }
}
- if ( ! $this->_has_operator($k))
+ if (! $this->_has_operator($k))
{
$k .= ' =';
}
@@ -690,7 +690,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function _like($field, $match = '', $type = 'AND ', $side = 'both', $not = '')
{
- if ( ! is_array($field))
+ if (! is_array($field))
{
$field = array($field => $match);
}
@@ -832,7 +832,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function _having($key, $value = '', $type = 'AND ', $escape = TRUE)
{
- if ( ! is_array($key))
+ if (! is_array($key))
{
$key = array($key => $value);
}
@@ -972,7 +972,7 @@ class CI_DB_active_record extends CI_DB_driver { {
$key = $this->_object_to_array($key);
- if ( ! is_array($key))
+ if (! is_array($key))
{
$key = array($key => $value);
}
@@ -1022,7 +1022,7 @@ class CI_DB_active_record extends CI_DB_driver { $this->from($table);
}
- if ( ! is_null($limit))
+ if (! is_null($limit))
{
$this->limit($limit, $offset);
}
@@ -1087,12 +1087,12 @@ class CI_DB_active_record extends CI_DB_driver { $this->from($table);
}
- if ( ! is_null($where))
+ if (! is_null($where))
{
$this->where($where);
}
- if ( ! is_null($limit))
+ if (! is_null($limit))
{
$this->limit($limit, $offset);
}
@@ -1130,7 +1130,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function insert($table = '', $set = NULL)
{
- if ( ! is_null($set))
+ if (! is_null($set))
{
$this->set($set);
}
@@ -1146,7 +1146,7 @@ class CI_DB_active_record extends CI_DB_driver { if ($table == '')
{
- if ( ! isset($this->ar_from[0]))
+ if (! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1179,7 +1179,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function update($table = '', $set = NULL, $where = NULL, $limit = NULL)
{
- if ( ! is_null($set))
+ if (! is_null($set))
{
$this->set($set);
}
@@ -1195,7 +1195,7 @@ class CI_DB_active_record extends CI_DB_driver { if ($table == '')
{
- if ( ! isset($this->ar_from[0]))
+ if (! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1238,7 +1238,7 @@ class CI_DB_active_record extends CI_DB_driver { {
if ($table == '')
{
- if ( ! isset($this->ar_from[0]))
+ if (! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1279,7 +1279,7 @@ class CI_DB_active_record extends CI_DB_driver { {
if ($table == '')
{
- if ( ! isset($this->ar_from[0]))
+ if (! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1321,7 +1321,7 @@ class CI_DB_active_record extends CI_DB_driver { {
if ($table == '')
{
- if ( ! isset($this->ar_from[0]))
+ if (! isset($this->ar_from[0]))
{
if ($this->db_debug)
{
@@ -1401,7 +1401,7 @@ class CI_DB_active_record extends CI_DB_driver { function _has_operator($str)
{
$str = trim($str);
- if ( ! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
+ if (! preg_match("/(\s|<|>|!|=|is null|is not null)/i", $str))
{
return FALSE;
}
@@ -1474,7 +1474,7 @@ class CI_DB_active_record extends CI_DB_driver { {
$this->_merge_cache();
- $sql = ( ! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
+ $sql = (! $this->ar_distinct) ? 'SELECT ' : 'SELECT DISTINCT ';
$sql .= (count($this->ar_select) == 0) ? '*' : implode(', ', $this->_filter_table_aliases($this->ar_select));
@@ -1577,7 +1577,7 @@ class CI_DB_active_record extends CI_DB_driver { */
function _object_to_array($object)
{
- if ( ! is_object($object))
+ if (! is_object($object))
{
return $object;
}
@@ -1586,7 +1586,7 @@ class CI_DB_active_record extends CI_DB_driver { foreach (get_object_vars($object) as $key => $val)
{
// There are some built in keys we need to ignore for this conversion
- if ( ! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table')
+ if (! is_object($val) && ! is_array($val) && $key != '_parent_name' && $key != '_ci_scaffolding' && $key != '_ci_scaff_table')
{
$array[$key] = $val;
|