From d2dd03143d9e47a36a2f8561160e278a358fa031 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 5 Oct 2006 04:34:38 +0000 Subject: --- system/database/drivers/mssql/mssql_result.php | 17 +++++++++++++++++ system/database/drivers/mysqli/mysqli_result.php | 17 +++++++++++++++++ system/database/drivers/oci8/oci8_result.php | 19 +++++++++++++++++++ system/database/drivers/odbc/odbc_result.php | 19 ++++++++++++++++++- system/database/drivers/postgre/postgre_result.php | 17 +++++++++++++++++ system/database/drivers/sqlite/sqlite_result.php | 17 +++++++++++++++++ 6 files changed, 105 insertions(+), 1 deletion(-) diff --git a/system/database/drivers/mssql/mssql_result.php b/system/database/drivers/mssql/mssql_result.php index 53b7832d9..498deae09 100644 --- a/system/database/drivers/mssql/mssql_result.php +++ b/system/database/drivers/mssql/mssql_result.php @@ -114,6 +114,23 @@ class CI_DB_mssql_result extends CI_DB_result { $this->result_id = FALSE; } } + + // -------------------------------------------------------------------- + + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + mssql_data_seek($this->result_id, $n); + } // -------------------------------------------------------------------- diff --git a/system/database/drivers/mysqli/mysqli_result.php b/system/database/drivers/mysqli/mysqli_result.php index 2eca68ff5..08db13f10 100644 --- a/system/database/drivers/mysqli/mysqli_result.php +++ b/system/database/drivers/mysqli/mysqli_result.php @@ -117,6 +117,23 @@ class CI_DB_mysqli_result extends CI_DB_result { // -------------------------------------------------------------------- + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + mysqli_data_seek($this->result_id, $n); + } + + // -------------------------------------------------------------------- + /** * Result - associative array * diff --git a/system/database/drivers/oci8/oci8_result.php b/system/database/drivers/oci8/oci8_result.php index 30c023ddc..a3da80026 100644 --- a/system/database/drivers/oci8/oci8_result.php +++ b/system/database/drivers/oci8/oci8_result.php @@ -161,6 +161,23 @@ class CI_DB_oci8_result extends CI_DB_result { } } + // -------------------------------------------------------------------- + + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + return FALSE; + } + // -------------------------------------------------------------------- /** @@ -192,6 +209,8 @@ class CI_DB_oci8_result extends CI_DB_result { return $res; } + // -------------------------------------------------------------------- + /** * Query result. "array" version. * diff --git a/system/database/drivers/odbc/odbc_result.php b/system/database/drivers/odbc/odbc_result.php index 385209c56..9204d8680 100644 --- a/system/database/drivers/odbc/odbc_result.php +++ b/system/database/drivers/odbc/odbc_result.php @@ -114,7 +114,24 @@ class CI_DB_odbc_result extends CI_DB_result { $this->result_id = FALSE; } } - + + // -------------------------------------------------------------------- + + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + return FALSE; + } + // -------------------------------------------------------------------- /** diff --git a/system/database/drivers/postgre/postgre_result.php b/system/database/drivers/postgre/postgre_result.php index ee838b450..8c25c5d4c 100644 --- a/system/database/drivers/postgre/postgre_result.php +++ b/system/database/drivers/postgre/postgre_result.php @@ -117,6 +117,23 @@ class CI_DB_postgre_result extends CI_DB_result { // -------------------------------------------------------------------- + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + pg_result_seek($this->result_id, $n); + } + + // -------------------------------------------------------------------- + /** * Result - associative array * diff --git a/system/database/drivers/sqlite/sqlite_result.php b/system/database/drivers/sqlite/sqlite_result.php index 7f48ce8aa..a3e94b471 100644 --- a/system/database/drivers/sqlite/sqlite_result.php +++ b/system/database/drivers/sqlite/sqlite_result.php @@ -113,6 +113,23 @@ class CI_DB_sqlite_result extends CI_DB_result { // -------------------------------------------------------------------- + /** + * Data Seek + * + * Moves the internal pointer to the desired offset. We call + * this internally before fetching results to make sure the + * result set starts at zero + * + * @access private + * @return array + */ + function _data_seek($n = 0) + { + sqlite_seek($this->result_id, $n); + } + + // -------------------------------------------------------------------- + /** * Result - associative array * -- cgit v1.2.3-24-g4f1b