Issues with complex queries in Query Builder and protected identifiers |
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. |
Messages In This Thread |
Issues with complex queries in Query Builder and protected identifiers - by mwhitney - 05-11-2015, 08:53 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by CroNiX - 05-11-2015, 09:11 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by mwhitney - 05-11-2015, 10:17 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by gadelat - 05-12-2015, 01:57 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by kilishan - 05-12-2015, 06:57 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by mwhitney - 05-12-2015, 08:45 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by CroNiX - 05-12-2015, 10:37 AM
RE: Issues with complex queries in Query Builder and protected identifiers - by mwhitney - 05-12-2015, 01:00 PM
|