[ic] AdvancedSearch - hiding a prod_group - category names repeated
John Matecsa
interchange-users@icdevgroup.org
Tue Feb 18 14:11:01 2003
In the course of hiding the existence of a prod_group called "Kits" from
most users I've bumped into a snag in advancedsearch.html.
Ideally the following would appear in the drop down list.
select distinct category from products where products.prod_group !=
'Kits' order by category;
But in drop down list below, each category name is repeated for each
instance in products.
How does one do the SQL equivalent of 'distinct' within the search?
I tried using un=yes to no avail.
I tried removing sku, from rf, but the resulting list was blank.
Just in case it matters.. we are running IC 4.8.6 with mySQL 3.23.52 on
RedHat 7.0
Thanks in advance for any suggestions!
<form action="[area search]" method=post>
<input type=hidden name=mv_session_id value="[data session id]">
<input type=hidden name=mv_substring_match value="Yes">
<input type=hidden name=mv_search_map value="
mv_searchspec=search1
mv_searchspec=search2
">
<input type=hidden name=mv_search_field value="category">
<input type=hidden name=mv_search_field value="*">
<table>
<tr>
<td>
<b>[LC]Search by Category[fr_FR]Recherche par
catégorie[/fr_FR][/LC]:</b><br>
[LC]Search for[fr_FR]Recherche pour[/fr_FR][/LC]
<input type="text" name=search2 value="">
[LC]in the[fr_FR]dans le ou la[/fr_FR][/LC]
<select name=search1>
[loop option=category search="
co=yes
sf=prod_group
se=Kits
nu=0
op=!~
ra=yes
fi=products
rf=sku,category
un=yes
ml=1000
tf=category
"]
<option value="[loop-data products category]">
[LOC][loop-data products category][/LOC]</option>
[/loop]
</select>
[LC]category.[fr_FR]catégorie[/fr_FR][/LC]
<input type="image" alt="Search" src="__THEME_IMG_DIR__go.gif"
border=0>
</td>
</tr>
</table>
</form>
--
John Matecsa <matecsaj@picassofish.com>
Picasso Fish Corporation