Re: limit search

From: Date: Tue, 31 Oct 2000 17:32:39 +0000
Subject: Re: limit search
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4074@lists.php.net to get a copy of this message
Hi, You have to use parentheses to specify the priority order in your query string: select BenchGLEnum, Bench_txt from SunshineSS where LENGTH(BenchGLEnum) < 11 AND ( BenchKey LIKE '%addition%' OR BenchKey LIKE '%subtraction%') > hello: > > I have the follwing mysql query that works to limit > results by looking at the length of a certain field > and only showing those records that fit the bill, > however when doing a keyword search (LIKE), the length > limiter does nothing!! > > select BenchGLEnum, Bench_txt > from SunshineSS > where LENGTH(BenchGLEnum) < 11 > AND BenchKey LIKE '%addition%' OR BenchKey LIKE > '%subtraction%' > > Anybody know why this behaves this way? > > __________________________________________________ > Do You Yahoo!? > Yahoo! Messenger - Talk while you surf! It's FREE. > http://im.yahoo.com/ > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.db (#4074) next »