I'm trying to use
$query = $this->db->query("YOUR QUERY");
$fields = $query->field_data();
which is documented at the bottom of this manual page http://ellislab.com/codeigniter/user-guide/database/fields.html
but I get a list of errors (more than a 100 of these) with any query, even a simple select * from tablename
.
I am using CodeIgniter 2, PHP Version 5.4.10, MySQL version 5.5.29
Does anyone know why this is happening?
$sql = "SELECT * FROM `article`";
$query = $this->db->query($sql);
$fields = $query->field_data();
Error list (first couple of them):
A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$Type Filename: mysqli/mysqli_result.php Line Number: 89
A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$Field Filename: mysqli/mysqli_result.php Line Number: 95
A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$Default Filename: mysqli/mysqli_result.php Line Number: 97
A PHP Error was encountered Severity: Notice Message: Undefined property: stdClass::$Key Filename: mysqli/mysqli_result.php Line Number: 99