Good afternoon guys, recently in one of my projects a problem has arisen and I hope you can help me.
To better understand the site is a site of consultations in the health area, such as clinics, cardiology, urology, etc. Some clinics can belong to two categories at the same time, such as "Clinic" and "Cardiology" I made the query as follows:
$url.= ' AND t.areadasaude LIKE "%'.$especialidadesaude.'%"';
The problem is, the category Cardiology belongs to id = 1, cardiology belongs to id = 19, LIKE queries everything inside the table all results that are within category 19 are appearing in category 1 that because LIKE takes number 1 from id 19. How do I get LIKE to get 100% of what is marked?
Note: If I mark two categories, the database is registered as follows: ["1","19"]
, we should consider in the tbm query when you have more than one category checked. Could someone help me?