• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Is it possible to make this query using Query Builder, if not how can I make it safe?

#6
(12-15-2015, 09:09 PM)meow Wrote: Learning something new everyday! Thank you.
BTW, do you have your thoughts written down anywhere about using/not using Query Builder as you've suggested?

I don't really have them written down about that, in particular. The biggest benefits of Query Builder is that it's cross-platform and makes switching databases simple. However, in all of the projects I've been on, I've never run across a time where we needed to switch databases. I'm sure it happens, but I don't think it's as big of a deal as it is sometimes made out to be. It also makes it convenient to build dynamic queries since you can add parts of the query in different methods of the model, which is often pretty convenient.

However, once I start getting into more complex queries with sub-queries, etc, I'll typically use straight SQL. That's in part because I'm working in SequelPro working out the queries so it's easiest to copy/paste it into the model.
Support Development  • Practical CodeIgniter 3  • Vulcan - CLI Tools for CI4
Reply


Messages In This Thread
RE: Is it possible to make this query using Query Builder, if not how can I make it safe? - by kilishan - 12-15-2015, 09:29 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.