In advanced search I can select several provinces. It seems very logical to me because you can search in your province and surroundings. But the sql that it generates does it with "LIKE".
SELECT adext. *, A.id FROM .... WHERE ... AND (a.ad_vectormap LIKE '% [{"code": "ES-M", "name": "Madrid"}, {"code" : "ES-TO", "name": "Toledo"}, {"code": "ES-GU", "name": "Guadalajara"}]% ') AND ... GROUP BY a.id
this sql should look something like this:
AND (a.ad_vectormap IN ('% {"code": "ES-M", "name": "Madrid"}%', '% {"code": "ES-TO", "name": "Toledo "}, '% {" code ":" ES-GU "," name ":" Guadalajara "}%')
to collect the three provinces.
If it is not possible, how to make the election of the provinces only be able to choose one?
SELECT adext. *, A.id FROM .... WHERE ... AND (a.ad_vectormap LIKE '% [{"code": "ES-M", "name": "Madrid"}, {"code" : "ES-TO", "name": "Toledo"}, {"code": "ES-GU", "name": "Guadalajara"}]% ') AND ... GROUP BY a.id
this sql should look something like this:
AND (a.ad_vectormap IN ('% {"code": "ES-M", "name": "Madrid"}%', '% {"code": "ES-TO", "name": "Toledo "}, '% {" code ":" ES-GU "," name ":" Guadalajara "}%')
to collect the three provinces.
If it is not possible, how to make the election of the provinces only be able to choose one?
Custom Fields
- Joomla Version
- 3.10.2
- PHP Version
- 7.4.20
- Product
- AdsManager
- Product Version
- 3.2