[ic] search query

Philip S. Hempel interchange-users@icdevgroup.org
Thu May 22 17:41:01 2003


On Thu, 2003-05-22 at 15:38, Stefan Hornburg wrote:
> On 22 May 2003 14:56:56 -0400
> "Philip S. Hempel" <pshempel@linuxhardcore.com> wrote:
> 
> > I am trying to get a search to function like the sql query below does
> > 
> > SELECT  `page`  FROM  `tree`  WHERE 1  AND  `mgroup`  =  'Products' AND 
> > `msort`  =  '0' AND  `page`  !=  ' '
> > 
> > So far I have this it at least. The search returns the desired
> > information except I am confused as to how to not return data if a
> > certain field is empty. I am not sure how to describe null or empty. I
> > have tried some things like using perl regex like [\w|\W] (I am certain
> > that is not correct format)
> > 
> > [loop
> >     search="
> >     fi=tree
> >     st=db
> >     tf=sort
> >     ac=0
> >     ac=0
> >     co=yes
> > 
> >     sf=page
> >     op=ne
> >     se=   <<- this is where I am lost how do you describe null or empty?
> > 
> >     sf=msort
> >     se=0
> >     op=rm
> > 
> >     sf=mgroup
> >     se=Products
> > 
> > "]
> > 
> > ====
> > 
> > The goal is to not return on field "page" being empty.
> 
> What about op=rm se=\S ?
> 

For some reason it only returns a few areas that have data in them. I
would have to think that there are non-white space characters in the
fields that are not returned.

If there was a term to just say something like the user tags do in using
the if statement i.e. if-loop-field do something it would be a little
easier.

I guess I may just bear down and look at creating an sql query of it. 
I am trying to do my best to learn IC syntax. I know that it is overall
easier to do IC tags in verse to sql queries (from what I have heard).

> > 
> > Any directions would be nice. If someone could point me to some doco
> > that would help.
> > 
> 
> http://www.icdevgroup.org/i/dev/docfly.html?mv_arg=icdatabase06%2e04

Thanks this is where I learned how to even use the database search
support.

> 
> Ciao
> 	Racke

Thanks again for you help.

-- 
Philip S. Hempel

Give a man a fish and he will feed himself for a day.
Teach a man to fish and he will feed himself for a lifetime.

http://linuxhardcore.com/