From 88f8d9f4c9d590cc14e71cd77f34e5e2abe57e21 Mon Sep 17 00:00:00 2001
From: Greg Aker
Date: Fri, 6 Aug 2010 13:01:38 -0500
Subject: Removing the following deprecated database methods: orwhere, orlike,
groupby, orhaving, orderby, getwhere.
---
system/database/DB_active_rec.php | 74 +---------------------------------
user_guide/changelog.html | 1 +
user_guide/database/active_record.html | 10 ++---
3 files changed, 7 insertions(+), 78 deletions(-)
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 3e9923e6f..953cc9548 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -398,18 +398,6 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
- /**
- * orwhere() is an alias of or_where()
- * this function is here for backwards compatibility, as
- * orwhere() has been deprecated
- */
- function orwhere($key, $value = NULL, $escape = TRUE)
- {
- return $this->or_where($key, $value, $escape);
- }
-
- // --------------------------------------------------------------------
-
/**
* Where
*
@@ -671,18 +659,6 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
- /**
- * orlike() is an alias of or_like()
- * this function is here for backwards compatibility, as
- * orlike() has been deprecated
- */
- function orlike($field, $match = '', $side = 'both')
- {
- return $this->or_like($field, $match, $side);
- }
-
- // --------------------------------------------------------------------
-
/**
* Like
*
@@ -775,18 +751,6 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
- /**
- * groupby() is an alias of group_by()
- * this function is here for backwards compatibility, as
- * groupby() has been deprecated
- */
- function groupby($by)
- {
- return $this->group_by($by);
- }
-
- // --------------------------------------------------------------------
-
/**
* Sets the HAVING value
*
@@ -801,19 +765,7 @@ class CI_DB_active_record extends CI_DB_driver {
{
return $this->_having($key, $value, 'AND ', $escape);
}
-
- // --------------------------------------------------------------------
-
- /**
- * orhaving() is an alias of or_having()
- * this function is here for backwards compatibility, as
- * orhaving() has been deprecated
- */
-
- function orhaving($key, $value = '', $escape = TRUE)
- {
- return $this->or_having($key, $value, $escape);
- }
+
// --------------------------------------------------------------------
/**
@@ -938,18 +890,6 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
- /**
- * orderby() is an alias of order_by()
- * this function is here for backwards compatibility, as
- * orderby() has been deprecated
- */
- function orderby($orderby, $direction = '')
- {
- return $this->order_by($orderby, $direction);
- }
-
- // --------------------------------------------------------------------
-
/**
* Sets the LIMIT value
*
@@ -1125,18 +1065,6 @@ class CI_DB_active_record extends CI_DB_driver {
// --------------------------------------------------------------------
- /**
- * getwhere() is an alias of get_where()
- * this function is here for backwards compatibility, as
- * getwhere() has been deprecated
- */
- function getwhere($table = '', $where = null, $limit = null, $offset = null)
- {
- return $this->get_where($table, $where, $limit, $offset);
- }
-
- // --------------------------------------------------------------------
-
/**
* Insert_Batch
*
diff --git a/user_guide/changelog.html b/user_guide/changelog.html
index f32ee58b3..7e86ba4eb 100644
--- a/user_guide/changelog.html
+++ b/user_guide/changelog.html
@@ -109,6 +109,7 @@ Hg Tag:
Semantic change to db->version() function to allow a list of exceptions for databases with functions to return version string instead of specially formed SQL queries. Currently this list only includes Oracle and SQLite.
Fixed a bug where driver specific table identifier protection could lead to malformed queries in the field_data() functions.
Fixed a bug where an undefined class variable was referenced in database drivers.
+ Removed the following deprecated functions: orwhere, orlike, groupby, orhaving, orderby, getwhere.
Helpers
diff --git a/user_guide/database/active_record.html b/user_guide/database/active_record.html
index 2c12d628e..482115ccd 100644
--- a/user_guide/database/active_record.html
+++ b/user_guide/database/active_record.html
@@ -116,7 +116,7 @@ instead of using the db->where() function:
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);
Please read the about the where function below for more information.
-Note: get_where() was formerly known as getwhere(), which has been deprecated
+Note: get_where() was formerly known as getwhere(), which has been removed
$this->db->select();
Permits you to write the SELECT portion of your query:
@@ -274,7 +274,7 @@ $this->db->or_where('id >', $id);
// Produces: WHERE name != 'Joe' OR id > 50
-Note: or_where() was formerly known as orwhere(), which has been deprecated.
+Note: or_where() was formerly known as orwhere(), which has been removed.
$this->db->where_in();
@@ -356,7 +356,7 @@ $this->db->or_like('body', $match);
-Note: or_like() was formerly known as orlike(), which has been deprecated.
+Note: or_like() was formerly known as orlike(), which has been removed.
$this->db->not_like();
This function is identical to like(), except that it generates NOT LIKE statements:
$this->db->not_like('title', 'match');
@@ -381,7 +381,7 @@ $this->db->or_not_like('body', 'match');
// Produces: GROUP BY title, date
-Note: group_by() was formerly known as groupby(), which has been deprecated.
+Note: group_by() was formerly known as groupby(), which has been removed.
$this->db->distinct();
@@ -439,7 +439,7 @@ The second parameter lets you set the direction of the result. Options are
// Produces: ORDER BY title DESC, name ASC
-Note: order_by() was formerly known as orderby(), which has been deprecated.
+Note: order_by() was formerly known as orderby(), which has been removed.
Note: random ordering is not currently supported in Oracle or MSSQL drivers. These will default to 'ASC'.
$this->db->limit();
Lets you limit the number of rows you would like returned by the query:
--
cgit v1.2.3-24-g4f1b