Actions
Feature #23087
closedFIND_IN_SET should be used instead of complicated LIKE where clause
Status:
Closed
Priority:
Should have
Assignee:
Category:
Database API (Doctrine DBAL)
Target version:
-
Start date:
2010-07-03
Due date:
% Done:
0%
Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:
Description
MySQL supports the FIND_IN_SET operator to efficiently find records having a given value in a set of values (comma-separated list of values). This is typically used with usergroups. This method should be used instead of doing some complicated LIKE query.
Solution:
Enhance the SQL query to support this operator and rewrite it if needed for other DBMS. Use a dedicated DBMS function whenever possible (PostgreSQL / MSSQL). For instance:
MSSQL: http://mschat.net/blog/index.php?topic=8
PostgreSQL: http://archives.postgresql.org/pgsql-sql/2009-12/msg00033.php
(issue imported from #M14985)
Files
Actions