Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search engine with many criteria #5493

Closed
yllen opened this issue Mar 1, 2019 · 0 comments
Closed

Search engine with many criteria #5493

yllen opened this issue Mar 1, 2019 · 0 comments
Labels
Milestone

Comments

@yllen
Copy link
Collaborator

yllen commented Mar 1, 2019

https://forum.glpi-project.org/viewtopic.php?id=167848

2 criteria: status and items seen

request generated for Where
WHERE glpi_tickets.is_deleted = 0 AND ( glpi_tickets.entities_id IN ('1', '332') ) AND
( ( glpi_tickets.status IN ('2') AND (glpi_tickets.id LIKE '%test%' ) OR (glpi_tickets.name LIKE '%test%' ) OR (glpi_entities.completename LIKE '%test%' ) OR (glpi_tickettasks.content LIKE '%test%' ) OR (glpi_tickets.status LIKE '%test%' ) OR (CONVERT(glpi_tickets.date_mod USING utf8) LIKE '%test%' )) ) GROUP BY glpi_tickets.id
ORDER BY ITEM_Ticket_19 DESC

the bold ( must be after the first criterion so before the first LIKE
WHERE glpi_tickets.is_deleted = 0 AND ( glpi_tickets.entities_id IN ('1', '332') ) AND ( glpi_tickets.status IN ('2') AND
((glpi_tickets.id LIKE '%test%' ) OR (glpi_tickets.name LIKE '%test%' ) OR (glpi_entities.completename LIKE '%test%' ) OR (glpi_tickettasks.content LIKE '%test%' ) OR (glpi_tickets.status LIKE '%test%' ) OR (CONVERT(glpi_tickets.date_mod USING utf8) LIKE '%test%' )) ) GROUP BY glpi_tickets.id
ORDER BY ITEM_Ticket_19 DESC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant