Timeline for db_select with subquery including conditions from 2 tables
Current License: CC BY-SA 3.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 30, 2016 at 19:55 | comment | added | phg | Sorry bummi and kiamlaluno, I'm new on the forum and I didn't know. I'll remember that ! | |
Jan 30, 2016 at 19:48 | comment | added | phg | "Mais c'est bien sûr !" as we say in France :) Thank you very very much Mario, it's working like a charm ! | |
Jan 30, 2016 at 13:03 | comment | added | Mario Steinitz | Altered my above answer. (Edit 2) | |
Jan 30, 2016 at 13:03 | history | edited | Mario Steinitz | CC BY-SA 3.0 |
Added second condition.
|
Jan 30, 2016 at 11:37 | comment | added | phg |
Thanks for your quick answer. I'd want to use db_select because I need a pager to display results, and extend PagerDefault doesn't work with db_query . I've tried your 2 solutions, but still no success :( - the first one can't work because of "condition('r.category', 'j.category')" : "j" alias isn't yet associated with the corresponding table - the second one return no results too But it gave me an idea : I tried to run db_select queries without "condition('r.category', 'j.category')" , and it return results ! but too much of course, the condition is needed. Here is a summary of wh
|
|
Jan 30, 2016 at 4:09 | history | edited | Mario Steinitz | CC BY-SA 3.0 |
added 9 characters in body
|
Jan 30, 2016 at 2:13 | history | edited | Mario Steinitz | CC BY-SA 3.0 |
Added source code comments.
|
Jan 30, 2016 at 2:07 | history | edited | Mario Steinitz | CC BY-SA 3.0 |
Added some words on query performance in Drupal.
|
Jan 30, 2016 at 1:52 | history | edited | Mario Steinitz | CC BY-SA 3.0 |
Corrected spelling, added a link as reference for further reading on inner joins.
|
Jan 30, 2016 at 1:38 | history | answered | Mario Steinitz | CC BY-SA 3.0 |