-
Notifications
You must be signed in to change notification settings - Fork 471
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
Cant get same columns nae from 2 tables #461
Comments
Can you try this : $crud->columns('ci_company.name'); I don't remember if this works. You may find more help here : https://www.grocerycrud.com/forums/ |
No, it doesnt work.
There is sql query:
As you can see, he doesnt take NAME column from select from ci_tarif table.
|
Mmmm... I’ve added the join() function in my branch (It has more stuff but not as beautiful as Scombourdis ;) ) |
I think tat the easiest way is to prefix your fields names in your database. TABLE ci_company
cin_name,
...
TABLE ci_tarif
cit_name, |
I cloned your branch but same problem still exist |
Did you use the join() function? If have to use the complete name: table.fieldname Ex. $crud->where(“client.name”,”portapipe”); Then you’ll have the complete table.fieldname name for each join except for the main table that you have to use with regular name without table name. |
God damn such unfriendly CRUD..Now it works. But add_fields doesnt show same name fields with exist value.
|
Try this: $this->crud->display_as('client.name', 'Client'); |
Doesnt help, so everyone thanks for solutions. I decided make custom
solutions.
вт, 16 окт. 2018 г. в 14:50, Benoit VRIGNAUD <[email protected]>:
… Try this:
$this->crud->display_as('client.name', 'Client');
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#461 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABHydY9osihlPGerLFCWvdCmsiEpViuTks5ulcgRgaJpZM4XbNfn>
.
|
I have same name column "Name" in 2 tables: ci_company and ci_tarif. Example show me only name from ci_company. How can I get name from ci_tarif?
The text was updated successfully, but these errors were encountered: