Welcome Guest, Not a member yet? Register   Sign In
Help with this SELECT statement
#7

[eluser]jerry4christ[/eluser]
[quote author="rufnex" date="1413537883"]next try ;o)

Code:
->select("SUM(IF(comments.is_active = '1',1,0)) total_comments", false)
[/quote]


Now you just hit the Jackpot!.... Thanks man;-)

but could you please explain what role that false is playing there


Nooooo.... the condition affected the selection on the parent table(blog). it's not supposed to filter the blog:down:


Messages In This Thread
Help with this SELECT statement - by El Forum - 10-16-2014, 11:36 AM
Help with this SELECT statement - by El Forum - 10-16-2014, 12:59 PM
Help with this SELECT statement - by El Forum - 10-16-2014, 11:21 PM
Help with this SELECT statement - by El Forum - 10-16-2014, 11:32 PM
Help with this SELECT statement - by El Forum - 10-17-2014, 02:15 AM
Help with this SELECT statement - by El Forum - 10-17-2014, 02:24 AM
Help with this SELECT statement - by El Forum - 10-17-2014, 02:30 AM
Help with this SELECT statement - by El Forum - 10-17-2014, 05:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB