[ic] One click search method. maybe I need some help

Jonathan Clark jonc at webmaint.com
Mon Aug 18 09:49:25 EDT 2003


> I choose to use the one click search method to build the list of the
> articles linked from the main menu, this for improve the spider access
> to the site.
> So this is the standar sql query that I need to build the list of
> articles for id_model 22 and id_scat 24.
> Someone can help me to translate this query, if it is possible, in the
> one click search syntax?
> I  does some try, (I paste the last one at the end of the mail), but
> without success.
> thanks in advance.
> Danilo
>
> SELECT DISTINCT
> `products`.`id_product`,`products`.`description`,`products`.`price`
> FROM `products`,`prodmods`
> WHERE prodmods.id_model = 22
> AND `products`.`id_scat`= 24
> AND `products`.`id_product` = `prodmods`.`id_product`
> ORDER BY `products`.`id_product` ASC

You can't get the DISTINCT in your searchspec or the join, but should be the
rest. Do you really need the join to prodmods?

First, its a coordinated search:

co=1

now, you need sets for each field:

sf=id_model
se=22
to=n

sf=id_scat
se=24
to=n

sf is search field, se= search spec, to is search option (numeric in this
case).

Then we add the sort order:

tf=id_product

So, you get:

[area search="
	co=1
	sf=id_model
	se=22
	to=n
	sf=id_scat
	se=24
	to=n
	tf=id_product"]

Note: you don't need to specify the table as the default is to search the
products table.

Search reference:
http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=icdatabase06%2e11
One-click searches:
http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=icdatabase06%2e07

Jonathan.


--
Jonathan Clark
Webmaint.com - Building Clever Websites   http://www.webmaint.com/
Webmaint.net - Business Web Hosting       http://www.webmaint.net/




More information about the interchange-users mailing list