I have a mysql query and it's not really complex but I can't seem to wrap my head on how I should approach writing this in Symfony.
First here is the query:
select
db1.table1.acronym
, db1.table1.name
, db2.table1.name
from db1.table1, db2.table1
where db1.table1.acronym like concat('%', @t1, '%')
or db1.table1.name like concat('%', @t1,'%')
or db2.table1.name like concat('%', @t1,'%');
I am basically trying to see if t1 is part of any word in those columns. Assume @t1 is a variable being passed. I am not sure if I should write this in a Repository and if so how. I am looking for the best practice method.
Thanks.