[ic] Search definition question. Data-format-induced craziness.

Martin Abell interchange-users@icdevgroup.org
Mon Jun 24 17:43:00 2002


I have a client who set up categories like:
 Connectors 
 Connectors-Audio
 Connectors-RF

and so on.  Each has multiple subcategories.  The original code for pulling
the subcategories out when a shopper clicked the category was:
  [loop search="
        st=sql
        sf=category
        se=[scratch catgy]
        tf=subcategory
        un=yes
        rf=subcategory
  "]

However, for the plain Connectors category, it retrieved the subcategories
for all categories beginning with "Connectors".  I tried every combination
of search term, e.g., op=em (or op=eq em=yes - whichever it is) and ac=1 and
so on and on and on.  Nothing worked.

Finally, I went to:
  [query sql="select distinct subcategory from products where category =
     '[scratch catgy]' order by subcategory" type=list]
(with accompanying syntax changes in the loop) and it worked.  (This is IC
4.8.1, and the tables are in mySQL.)

So, it's just a curiosity at this point, but does anyone know how to make
the loop type of search bring the same results as the query search?

(I was about ready to change "Connectors" to "Connectors-Misc" which I'm
pretty sure would work.  Come to think of it, that's probably what the
client will do after they get everything sorted out!)

Martin
SecondStoreOnTheWeb
SpeedSpan