[ic] Variants table and mv_searchspec

Stefan Hornburg racke at linuxia.de
Wed Mar 18 14:00:22 UTC 2009


graham hadgraft wrote:
> Im having trouble trying to perform a search.  Im creating a search and 
> i need to do to clauses where products.description LIKE '%something%' 
> and variants.description LIKE '%something%'.  Im using the search-region 
> and mv_searchspec parameters but i cant seem to get it to perform the 
> search.
> 
> As far as i can tell from the interchange docs you suppose to reference 
> another table using the format table:field in the mv_search_fields 
> parameter but it does not seem to be searching using this.
> 
> I have the following search parameters.
> 
> mv_coordinate = 'yes'
> mv_search_file = 'products'
> mv_searchtype = 'db'
> mv_return_fields = 'sku, description, prod_group, category, option_type, 
> manufacturer, comment, rrp, price'
> mv_sort_field = 'category, manufacturer, price, description'
> mv_sort_option = 'f,f,n,f'
> 
> mv_search_field = 'prod_group'
> mv_column_op = 'rm'
> mv_search_spec = 'something'
> 
> mv_search_field = 'variants:description'
> mv_column_op = 'rm'
> mv_search_spec = 'something'
> 
> As i said this does not seem to match the desired results the equivalent 
> sql query for this would be:
> 
> SELECT p.sku, p.description, p.prod_group, p.category, p.option_type, 
> p.manufacturer, p.comment, p.rrp, p.price
> FROM products AS p, variants AS v
> WHERE v.sku = p.sku AND p.prod_group LIKE '%something%' AND 
> v.description LIKE '%something%'
> ORDER BY category, manufacturer, price, description
> 
> Unfortunatly for certain resons i can not use  query i have to uise the 
> search-region. What is wrong with the search parameters i am adding.

It would be much more easier to use [query], so please elaborate on
"certain reasons".

Regards
          Racke

-- 
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team




More information about the interchange-users mailing list