Is it possible to make this query using Query Builder, if not how can I make it safe? |
(11-30-2015, 08:26 AM)kilishan Wrote: First off - for many projects, there's no need to use Query Builder, and you'll get a (very) slight performance increase from not using it. So, I won't dig into the possibilities of using the query with Query Builder here. Instead, lets look at how to make it safe. This is easy to do using Query Bindings. Basically, replace all instances of variables in your query with a question mark. Then, pass those values as an array to the query() method: This is awesome! Extremely helpful. Thank you so much! I can't wait to try it out tomorrow. |
Messages In This Thread |
Is it possible to make this query using Query Builder, if not how can I make it safe? - by DreamOfSleeping - 11-30-2015, 04:18 AM
RE: Is it possible to make this query using Query Builder, if not how can I make it safe? - by kilishan - 11-30-2015, 08:26 AM
RE: Is it possible to make this query using Query Builder, if not how can I make it safe? - by DreamOfSleeping - 11-30-2015, 12:50 PM
RE: Is it possible to make this query using Query Builder, if not how can I make it safe? - by meow - 12-15-2015, 09:09 PM
RE: Is it possible to make this query using Query Builder, if not how can I make it safe? - by rtorralba - 11-30-2015, 01:41 PM
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
|