Hello,
I have noticed the following with the grid.
I have a “text” field which is a title. E.g.:
1. This is a title
2. This is another title
In database I Select unique titles and search per column works.
However, when I Select all titles and duplicates, search per column does not filter the list.
1. This is a title
2. This is a title
3. This is another title
4. This is another title
A searchable column has to be unique?
I think I have just found the reason:
$g->select_command = “SELECT
id,
title,
theme,
published
FROM
custom_joomla_pages
WHERE
app_id = 6
OR
app_id = 17
“;
Because II am using a WHERE with my custom sql query, it looks like the search can’t handle duplicates.
Is there a better way of writing my WHERE clause, so search will not be interfered with?
Hello,
I guess you need to enclose the OR conditions in ( ) so new conditions are AND’ed with the whole block:
WHERE (
app_id = 6
OR
app_id = 17 )