[ic] how to write in [search-region..

Greg Goble interchange-users@interchange.redhat.com
Wed Apr 17 03:32:00 2002


Grace wrote:

> Thanks Greg
> For
> [page search="
>               sf=status
>               se=expired
>               se=cancled
>               os=yes"] linked_text_here [/page]
>
> what's mean "linked_text_here"?
> where to put "op=eq"?
> and if i want to express
> "where status='expired' or stauts='cancled' or deleted=1"
> how to write code in [page search...?
> >Grace writes:
>
> > How to write in [search-region..
> > 			co=yes
> >
> > 			sf=status
> > 			se=canceled
> > 			op=eq
> >
> > 			sf=status
> > 			se=expired
> > 			op=eq
> >
> > to express the following statement?
> > where status eq 'canceled' or status eq 'expired'
>
>
> >Grace,
>
> >Sounds like you're doing the same thing I'm doing.
>
> >Here's what I use:
>
> >[page search="
> >              sf=status
> >              se=expired
> >              se=cancled
> >              os=yes"] linked_text_here [/page]
>
>
> >OR you could also do an sql query...something like this:
>
> >[query list=1 sql="
> >             SELECT * from products
> >             WHERE status = 'expired' or status = 'canceled'
> >"]
>
> >Hope this helps.
> >Regards, Greg

Grace,

The code above is a 'page search' or 'scan'  function and acts like href,
therefore, you need _text_ before your closing [/page] (i.e., </a>) in order
to create and end your link. That's what I meant by 'linked_text_here.'

If you have in your products a column labeled status with values expired or
canceled, I see no reason why you need op=eq when you use os=yes.

Someone once taught me on this list to experiment with the URL field in the
browser. Just a faster way of trying different search options.  The code I
use and passed to you produces this result in the URL field:
http://domain_name/cgi-bin/catalog_name/scan/sf=status/se=pending/se=confirm
ed/os=yes.html
IC will return a [page search...] to /scan/ as you see above.

Tip: Try experimenting with your URL field in your browser in order to
create a search parameter that returns the results you're after.

You typed 'cancled'  and 'stauts' wrong below, which will definitely cause a
problem if it's mistyped in your code. Type-O's can be everything! At least
they kill me!

Re: your question "where status=expired or status=canceled' is more or less
the same as sf=status/se=canceled/se=expired/co=yes, and I'm not sure why
you are searching for something which appears to be deleted.

Here's more samples searches, scan, etc. specifically [search-region...
http://interchange.redhat.com/cgi-bin/ic/docfly.html?mv_arg=icdatabase06%2e0
9

Regards. Greg