[ic] Search help with Alphabetic Range

Mike Heins mike at perusion.com
Sun Jul 21 20:44:52 UTC 2013


Quoting L Collins (starsgps at gmail.com):
> PLEASE Help!!  I've been reading IC help pages for days and nothing I
> try is working.
> 
> First of all, I sell over 22K products so creating a 'sitemap' which
> includes all my items sorted alphabetically and those with a cwrpart
> (MFG PM#) is not practical --takes too long to load/times-out-- but,
> this code does work:
> 
> http://www.ultimatepassage.com/cgi-bin/up/scan/fi=products/st=db/sp=sitemap/co=1/sf=cwrpart/se=1/op=gt/nu=0/ml=25000/tf=description/to=x.html
> 
> (---And if I lower the ml=, the MORE-LIST out-put is totally screwed up!)
> 
> What I want to do is a listing of all products beginning with the
> letters A to C or D to G, etc. which include a cwrpart (mfg pn#).
> 
> ---I CAN get Just "A's" to work:
> http://www.ultimatepassage.com/cgi-bin/up/scan/fi=products/st=db/co=1/sp=sitemap/sf=description/se=a/op=rm/nu=0/bs=1/su=1/sf=cwrpart/se=1/op=>/nu=1/bs=1/su=/ml=9999/tf=description/to=x

I'd just use a page that has a query on it (this will work for MySQL):

[query
    list=1
    sql="
	SELECT * FROM products
	WHERE description RLIKE '[-abc]%'
	AND cwrpart = 1
       "]
[sql-code] -- [sql-param description] -- [currency][sql-param price][/currency]<br>
[/query]

(The - keeps any [abc] tag from causing a problem.)

You could even use the same page for all with a CGI parameter and
appropriate filter:

[query
    list=1
    sql="
	SELECT * FROM products
	WHERE description RLIKE '[[cgi name=letters filter=word]]%'
	AND cwrpart = 1
    "]
[sql-code] -- [sql-param description] -- [currency][sql-param price][/currency]<br>
[/query]

Then call the page with:

     http://www.ultimatepassage.com/cgi-bin/up/alpha?letters=def

A competent IC consultant can set up all sorts of things for you if
you want to make it better -- most common effective thing to do is
make search terms show up in page names so that you show up more
readily on search engines.

Good luck!

-- 
Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.253.4194  <mike at perusion.com>

Find the grain of truth in criticism, chew it, and swallow
it. -- anonymous



More information about the interchange-users mailing list