-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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 load numerical field names from Database #2278
Comments
Could you show some real code please? |
DUMMY DATA:
Not working situation. CODE:
RESULT:
Adjusted (working situation) CODE
RESULt:
Result set:
|
This is not a CodeIgniter bug, it's a PHP limitation - property names cannot start with a digit.
|
ah. actually result_array() does provide a work around as well. |
@ajslaghu , thanks for the workaround. I had the same problem as yours. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have piece of code that pulls weekyears as columnnames from the database.
However, using numerical values does not give those colums back in the results. Perpending the numerical value with a letter , does return the correct results.
Not working code:
SELECT
Merk
,201302
AS 201302,201303
AS 201303,201304
AS 201304,201305
AS 201305,201302
+201303
+201304
+201305
AS som FROM (stats_nebuys_eek_merk
) WHERE201302
+201303
+201304
+201305
> 100 ORDER BY201302
+201303
+201304
+201305
DESC LIMIT 15Working:
SELECT
Merk
,201302
AS W201302,201303
AS W201303,201304
AS W201304,201305
AS W201305,201302
+201303
+201304
+201305
AS som FROM (stats_newbuys_week_merk
) WHERE201302
+201303
+201304
+201305
> 100 ORDER BY201302
+201303
+201304
+201305
DESC LIMIT 15I use $this->db->query($sql); for inserting those queries.
The text was updated successfully, but these errors were encountered: