Welcome Guest, Not a member yet? Register   Sign In
problem with database query
#1

[eluser]dagon[/eluser]
Hello

Im quite new to code igniter and the concept of active record pattern of database handling. I have problems with translating such SQL query into a series of active record method calls:

select TA.*, count(*) as num_entries from table_a AS TA inner join table_b AS TB ON TB.id_category = TA.id GROUP BY TB.id_category ORDER BY num_entries DESC;

Can anyone help ? I have aspecially problems with adapting count(*).


Messages In This Thread
problem with database query - by El Forum - 07-11-2011, 06:06 AM
problem with database query - by El Forum - 07-11-2011, 11:17 AM
problem with database query - by El Forum - 07-11-2011, 12:55 PM
problem with database query - by El Forum - 07-12-2011, 01:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB