db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Hepp <h...@evamann.de>
Subject Re: is this really the way to combine several or´s ?
Date Wed, 22 Dec 2004 22:39:37 GMT
thanks all,

but that can become a quite difficult thing, when i want to produce an efficient 
and correct statement...

is the following example statement possible with torque then? :

SELECT * FROM my_users where (LAST_NAME="Hepp" AND FIRST_NAME="Alex") or 

or this:

SELECT * FROM my_users where (LAST_NAME="Hepp" AND FIRST_NAME="Alex" or 
LOGIN_NAME="heppa") or USER_ID="10023";

well, i feel like you can only do this with a well configured debug output;)

Thanks to all for the help.

Kind Regards

T E Schmitz schrieb:
> Hallo Alex,
> This is exactly it. Particularly when using the same column in more than 
> one condition you *have to* use Criterions and "or" or "and" them 
> together. Criteria is based on a HashMap with the column name as the 
> key. If you Criteria.add'ed a column condition it would overwrite the 
> previously added condition (for the same column).

büro für design & informatik evamann gbr

alex hepp, dipl. informatiker (fh) | alkuinstr. 24 | d-54290 trier
tel.: 0651 991 61 03  |  mobil: 0170 342 02 24
e-mail: hepp@evamann.de | www.evamann.de

View raw message