Welcome Guest, Not a member yet? Register   Sign In
Using LIKE query in HAVING Clause
#1

I need to build a query where I will have a clause like the following

SELECT *
FROM tableA 
LEFT JOIN tableB
LEFT JOIN tableC
WHERE tableA.active = 1
HAVING tableC.columnA LIKE '%$search_term%';

  1. How can I do this using the query builder?
  2. How can I ensure that the query is protected from SQL injection?
Thanks.
Reply
#2

If you have tried something that doesn't work and need advice on how to fix it then this is the place to be. But, this isn't a code writing service. Please make a minimal effort before you ask for someone's time and expertise.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB