Hi,
I have the next problem with a quick search option. The main sql query for the grid app is the next:
SELECT
alarmas.id,
cras.nombreComercial,
alarmas.type,
alarmas.id_user_original,
alarmas.dispositivo_id,
alarmas.id_contract,
alarmas.opened,
alarmas.estado,
alarmas.finalizada,
alarmas.id_cra,
alarmas.ha_finalizado
FROM
alarmas INNER JOIN cras ON alarmas.id_cra = cras.id
ORDER BY
alarmas.id_cra, alarmas.type
The search->Quick search->Select fields includes all the fields of the search query. But when I try to search by a cras.nombreComercial (by example as a value that exists “Medical”), the search query doesn’t return nothing, and the resulting query of the search doesn’t take care about the cras.nombreComercial (this is the dumped queries of the search results after search is thrown):
(pdo-mysql): SELECT concat(marca,' ',modelo,' ',nombre), id FROM dispositivos WHERE (concat(marca,' ',modelo,' ',nombre) LIKE '%Medical%')
(pdo-mysql): select count(*) from alarmas INNER JOIN cras ON alarmas.id_cra = cras.id where (alarmas.opened like '%Medical%')
(pdo-mysql): SELECT cras.nombreComercial as cras_nombrecomercial, alarmas.type as alarmas_type, alarmas.dispositivo_id as alarmas_dispositivo_id, alarmas.estado as alarmas_estado, alarmas.finalizada as alarmas_finalizada, alarmas.ha_finalizado as alarmas_ha_finalizado, alarmas.id as alarmas_id from alarmas INNER JOIN cras ON alarmas.id_cra = cras.id where (alarmas.opened like '%Medical%') order by cras.nombreComercial asc, alarmas.type asc, alarmas.id_cra asc LIMIT 0,12
(pdo-mysql): select cras.nombreComercial, COUNT(*) from alarmas INNER JOIN cras ON alarmas.id_cra = cras.id where (alarmas.opened like '%Medical%') GROUP BY cras.nombreComercial order by cras.nombreComercial ASC
(pdo-mysql): select cras.nombreComercial, COUNT(*) from alarmas INNER JOIN cras ON alarmas.id_cra = cras.id where (alarmas.opened like '%Medical%') GROUP BY cras.nombreComercial order by cras.nombreComercial ASC
As you can notice, the cras.nombreComercial is never cmopared with “Medical” input string.
Why I can search for a value that is supposed included in the quick search?
Many thanks,
Dani