- Posts: 1421
- Thank you received: 234
SQL Filters / Wildcard searches
12 years 1 month ago #254
by redactie
SQL Filters / Wildcard searches was created by redactie
Version 2.5.1406 introduces a new filter allowing to use plain mysql queries as filter
This will show popular and recent items only.
The query can be used to perform wildcard searches
'
Keep in mind that wildcard ( or regexp ) queries are not very efficient and might result in slow queries. It is far beter to perform this kind of searches during import:
and use Select9 ( which is menu_9 ) as a normal excact match filter in the menu configuration
Code:
hits > 5 || ((adddate + interval 2 day ) > now() )
The query can be used to perform wildcard searches
Code:
Title like '%black%
Keep in mind that wildcard ( or regexp ) queries are not very efficient and might result in slow queries. It is far beter to perform this kind of searches during import:
Code:
if ( stripos($item['description'],'black') !== false ) {
$item['menu_9']='black';
}
and use Select9 ( which is menu_9 ) as a normal excact match filter in the menu configuration
Please Log in to join the conversation.
11 years 11 months ago #712
by Soener
Replied by Soener on topic Re: SQL Filters / Wildcard searches
could this also used to exclude items? if yes, how?
Please Log in to join the conversation.
11 years 11 months ago #715
by redactie
if you can use exact match ketwords you can use the 'normal' filters using a '-' sign
so -other will exclue keyword other.
otherwise a query to eclude would be
Replied by redactie on topic Re: SQL Filters / Wildcard searches
Soener wrote: could this also used to exclude items? if yes, how?
if you can use exact match ketwords you can use the 'normal' filters using a '-' sign
so -other will exclue keyword other.
otherwise a query to eclude would be
Code:
Title not like '%black%
Please Log in to join the conversation.
11 years 9 months ago #1000
by mackelito
Replied by mackelito on topic Re: SQL Filters / Wildcard searches
Hmm.. I cant get this to work...
I have entered "Title like '%black%' " in the modules "SQL Filter"....
But no results.. not even if I enter "Title like '%%' "
I have entered "Title like '%black%' " in the modules "SQL Filter"....
But no results.. not even if I enter "Title like '%%' "
Please Log in to join the conversation.
11 years 9 months ago #1001
by mackelito
Replied by mackelito on topic Re: SQL Filters / Wildcard searches
Oooooh ok.. It must be on a com_datafeed page!... hmm.. ok....
Is there some way to not display any products on a page? If I set number of Items to 0 I get a server 500 error.
Is there some way to not display any products on a page? If I set number of Items to 0 I get a server 500 error.
Please Log in to join the conversation.
11 years 9 months ago #1002
by mackelito
Replied by mackelito on topic Re: SQL Filters / Wildcard searches
Should I not get just the once that start with "a" if I enter "Select2 like 'a%'" in the SQL filter?
Please Log in to join the conversation.
Time to create page: 0.699 seconds