db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Founaboui Haman" <fha...@kommunity.net>
Subject Re: Help on building an sql criteria
Date Mon, 24 Nov 2003 16:30:39 GMT
Any way thank you for your answer

haman

----- Original Message ----- 
From: "Jarnot Voytek Contr AU HQ/SC" <Voytek.Jarnot@MAXWELL.AF.MIL>
To: "'Apache Torque Users List'" <torque-user@db.apache.org>
Sent: Monday, November 24, 2003 5:20 PM
Subject: RE: Help on building an sql criteria


> Never mind my answer please, I just realized that you have articleName and
> articleNumber; not articleName twice (as I had thought) ...
>
>
>
> > -----Original Message-----
> > From: Jarnot Voytek Contr AU HQ/SC
> > [mailto:Voytek.Jarnot@maxwell.af.mil]
> > Sent: Monday, November 24, 2003 10:18 AM
> > To: 'Apache Torque Users List'
> > Subject: RE: Help on building an sql criteria
> >
> >
> > How about this:
> >
> > ...
> > criteria.add(YourPeer.ARTICLENAME, "%searchString%", Criteria.LIKE);
> > Criteria.Criterion criterion =
> > criteria.getCriterion(YourPeer.ARTICLENAME);
> > criterion.or(criteria.getNewCriterion(
> >                              criterion.getTable(),
> >                              criterion.getColumn(),
> >                              "%searchString%",
> >                              Criteria.LIKE ));
> > ...
> >
> > Try that.
> >
> > By the way, I essentially cut and paste the code above from the torque
> > website - the criteria howto should be your first resource:
> > http://db.apache.org/torque/criteria-howto.html
> >
> > --
> > Voytek Jarnot
> > Quantum materiae materietur marmota monax si marmota monax
> > materiam possit
> > materiari?
> >
> >
> > > -----Original Message-----
> > > From: Founaboui Haman [mailto:fhaman@kommunity.net]
> > > Sent: Monday, November 24, 2003 10:10 AM
> > > To: torque-user@db.apache.org
> > > Subject: Help on building an sql criteria
> > >
> > >
> > > Hi there,
> > >
> > > I am looking for a way to build the following criteria in torque.
> > > The sql:
> > >
> > > SELECT * FROM articles WHERE any condition AND (articlename
> > > LIKE '%seachString%' OR articleNumber LIKE '%searchString%');
> > >
> > > My problem resides in the criteria between the parenthesis.
> > > Any help with code shnippet could be appreciated.
> > > Thank for your help
> > >
> > > haman
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> > For additional commands, e-mail: torque-user-help@db.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
> For additional commands, e-mail: torque-user-help@db.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org


Mime
View raw message