Welcome Guest, Not a member yet? Register   Sign In
Issues with complex queries in Query Builder and protected identifiers
#5

If you're on the CI3 version of your site, have you tried Query grouping? I haven't actually tried using that, yet, and the example doesn't show it working in a 'FROM' clause, but it might be worth looking into.

However, I tend to agree with gadelat on this one. For any complex queries, I typically build the query manually and use $this->db->query() with parameter binding. If it gets really complex, I'll leave some placeholders in the query, like it was a view template, almost, and then do string replacement with the correct queries until I have what I need. And inside of an app, I don't have a problem not using the query builder. I think the times when someone moves from one database to another are pretty slim and, when they do happen, they're part of a much larger change so it's expected to be a bit time-consuming.
Reply


Messages In This Thread
RE: Issues with complex queries in Query Builder and protected identifiers - by kilishan - 05-12-2015, 06:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB