summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/database/DB_active_rec.php27
1 files changed, 24 insertions, 3 deletions
diff --git a/system/database/DB_active_rec.php b/system/database/DB_active_rec.php
index 08213af5c..ba68e1e8f 100644
--- a/system/database/DB_active_rec.php
+++ b/system/database/DB_active_rec.php
@@ -7,8 +7,8 @@
* @package CodeIgniter
* @author ExpressionEngine Dev Team
* @copyright Copyright (c) 2006, EllisLab, Inc.
- * @license http://codeigniter.com/user_guide/license.html
- * @link http://codeigniter.com
+ * @license http://www.codeigniter.com/user_guide/license.html
+ * @link http://www.codeigniter.com
* @since Version 1.0
* @filesource
*/
@@ -24,7 +24,7 @@
* @subpackage Drivers
* @category Database
* @author ExpressionEngine Dev Team
- * @link http://codeigniter.com/user_guide/database/
+ * @link http://www.codeigniter.com/user_guide/database/
*/
class CI_DB_active_record extends CI_DB_driver {
@@ -45,6 +45,27 @@ class CI_DB_active_record extends CI_DB_driver {
var $ar_aliased_tables = array();
/**
+ * DB Prefix
+ *
+ * Prepends a database prefix if one exists in configuration
+ *
+ * @access public
+ * @param string the table
+ * @return string
+ */
+ function dbprefix($table = '')
+ {
+ if ($table == '')
+ {
+ $this->display_error('db_table_name_required');
+ }
+
+ return $this->dbprefix.$table;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Select
*
* Generates the SELECT portion of the query