Welcome Guest, Not a member yet? Register   Sign In
Forced to run DB Query from View (Bad practice?)
#13

[eluser]Pascal Kriete[/eluser]
The current logic doesn't, but I believe that's what the PS was for.

If all you have are categories and entries with no further nesting, then all you have to do is join the two tables. Truly one query.
Code:
$this->db->join('entries', 'entries.FK_category_id = 'categories.category_id', 'left');


Messages In This Thread
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 09:10 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 09:16 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 10:45 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 12:30 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 01:39 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 04:31 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 05:23 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 05:30 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-26-2008, 06:24 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 04:04 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 05:14 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 06:42 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 05-27-2008, 07:39 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-28-2008, 10:37 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-28-2008, 10:53 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 07:10 AM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 05:11 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 06:17 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 07:37 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 08:55 PM
Forced to run DB Query from View (Bad practice?) - by El Forum - 07-29-2008, 10:38 PM



Theme © iAndrew 2016 - Forum software by © MyBB