summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2015-01-23 23:28:31 +0100
committerAndrey Andreev <narf@devilix.net>2015-01-23 23:28:31 +0100
commitaed962b9561840e71543062ff362cdbf54106be0 (patch)
tree73957d54813e4373a1e20ce8454faa25b810eede
parent7e9ee483a0928df9eb46ce9f4f5ef57bf2f999f7 (diff)
parentf1294cb402dc35db9c9b26441807d851d0449970 (diff)
Merge pull request #3502 from dev-ggallon/Database
Database Driver Clean and Fix
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_4d_forge.php2
-rw-r--r--system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php2
-rw-r--r--system/database/drivers/sqlite3/sqlite3_result.php2
3 files changed, 2 insertions, 4 deletions
diff --git a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
index 9ede03e10..9dc692c1e 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_4d_forge.php
@@ -44,7 +44,7 @@ defined('BASEPATH') OR exit('No direct script access allowed');
* @author EllisLab Dev Team
* @link http://codeigniter.com/user_guide/database/
*/
-class CI_DB_pdo_4d_forge extends CI_DB_4d_forge {
+class CI_DB_pdo_4d_forge extends CI_DB_pdo_forge {
/**
* CREATE DATABASE statement
diff --git a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
index c90712a99..e8e24c6b3 100644
--- a/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
+++ b/system/database/drivers/pdo/subdrivers/pdo_mysql_forge.php
@@ -199,8 +199,6 @@ class CI_DB_pdo_mysql_forge extends CI_DB_pdo_forge {
$extra_clause = ' FIRST';
}
- $comment_clause = isset($field['comment']) ? ' COMMENT ' . $field['comment'] : '';
-
return $this->db->escape_identifiers($field['name'])
.(empty($field['new_name']) ? '' : ' '.$this->db->escape_identifiers($field['new_name']))
.' '.$field['type'].$field['length']
diff --git a/system/database/drivers/sqlite3/sqlite3_result.php b/system/database/drivers/sqlite3/sqlite3_result.php
index f5c24672e..387481b7f 100644
--- a/system/database/drivers/sqlite3/sqlite3_result.php
+++ b/system/database/drivers/sqlite3/sqlite3_result.php
@@ -98,7 +98,7 @@ class CI_DB_sqlite3_result extends CI_DB_result {
);
$retval = array();
- for ($i = 0, $c = $this->num_fields(); $i < $this->num_fields(); $i++)
+ for ($i = 0, $c = $this->num_fields(); $i < $c; $i++)
{
$retval[$i] = new stdClass();
$retval[$i]->name = $this->result_id->columnName($i);