New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not get field_data by $query->field_data(); #1619
Comments
You must set one parameter for table name. $fields = $query->field_data('test'); |
Use build in CI function to get field names. Why need to write SQL.
|
This is still quite obviously and thoroughly broken. In 2.1.2 There are several related issues that have been closed (#1111, #785, #1101), but the attached commits don't seem to work - they fix the @appleboy You only need to pass in the table name when calling @goserverside Again, @sdhiraj is talking specifically about calling This is stinging me hard at the moment, so just wanted to add some more detail and make sure this issue doesn't get ignored. If I manage to fix it before I run out of time and have to abandon the upgrade, I'll submit a pull request. |
I should have said, I can see that this SEEMS to be fixed in 3.0-dev, although I haven't tested. |
It is indeed fixed in develop. |
$query = $this->db->query("YOUR QUERY");
$fields = $query->field_data();
In Codeigniter 2.1.2 When executing this type of query it gives following errors
(it works fine in 2.1.0)
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$Type
Filename: mysql/mysql_result.php
Line Number: 89
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$Field
Filename: mysql/mysql_result.php
Line Number: 95
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$Default
Filename: mysql/mysql_result.php
Line Number: 97
A PHP Error was encountered
Severity: Notice
Message: Undefined property: stdClass::$Key
Filename: mysql/mysql_result.php
Line Number: 99
The text was updated successfully, but these errors were encountered: