Welcome Guest, Not a member yet? Register   Sign In
Active Record Join with and or
#4

Instead of $this->db->get(), try $this->db->get_compiled_select() and output the actual query that CodeIgniter will use. It helps debugging when there are issues with the Query Builder. My initial guess is an issue with the WHERE clauses. Why do you have three separate calls to ->where() when you are compiling them into variables at the top anyway? Why not combine them?

The order is less relevant in regards to the different methods as the query isn't built until the end where it will place the items in the correct order (WHERE before GROUP BY for example). For legibility sake, I would keep it as close as possible.
Reply


Messages In This Thread
Active Record Join with and or - by Marcel - 05-02-2017, 01:55 AM
RE: Active Record Join with and or - by InsiteFX - 05-02-2017, 04:03 AM
RE: Active Record Join with and or - by Marcel - 05-02-2017, 05:50 AM
RE: Active Record Join with and or - by xenomorph1030 - 05-02-2017, 07:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB