-
Notifications
You must be signed in to change notification settings - Fork 41
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
Data does not appear if fetched from table name with dot symbol #37
Comments
it leads me to this function
on the first conditional, on else block, if the table are from other scheme, the table name have double quotes on each which is separated by dot if i'm changing to table without any schema defined, like this.. so i'm trying to debug how does getFieldData works since it was a part of Codeigniter 4 it self
Here is the result... Well, looks like it doesn't need to include the schema name (even with dot, just table name), and here is the result...
|
i have proposed the PR #38 |
did you try schema on config? I'm worried that if your pull request is applied it will damage other database drivers.. |
in my case, i have some connection that depends on other database type (mysqly postgre, and oraclr), i need to still define the dot on option which is required to choose the table by name (especially postgre which is linked to schema) the code i've applied just doing the general task (detecting dots, if the string are looks normal, just leave it be) i know that soo many of library user are reliying on mySQL, if they saw the similar problem, they just simply use another lib honestly, i'm not forcing you to accept my pr, just making use of this lib a bit easier, readable, and understandable, i have spend my time doing the test based on the changes i made, soo i was thinking it's "optionally good" implement those changes you might need to test it out too it's interesting to know more about the config, which option that i should set? and what value should i define though? ps: sorry i'm not on my laptop at the moment right now |
sorry for having kept you waiting, thanks for suggestion though, i tried tinkering with all of those configuration... nothing met my expectation, the best i can do is modify the base code based on my proposed PR (i was thinking at the beginning, maybe it works because the way of codeigniter is create new connection with new schema, but it fails) and there's another problem too, while doing search (fetched from non-public schema) the error shown up since the key pressed i'll try to find what causing this but i'm 100% percent sure the lib base code should handle these behavior might be a good benefit... |
Bug Description
All data from query result wont simply return the all column of the data, resulting only show the data which is came from add() method (but the amount of data is correct).
As my investigation goes, this is caused by table which is placed on different schema (for ex: the data shown up if the table is from "public" schema instead of "other_public" schema)
My Code
In controller
if using model, here is what it looks like:
Model
Controller
Screenshots

but if you check the query result using dd or whatever, it shows all the data
The text was updated successfully, but these errors were encountered: