RE: limit search
| From: | Mark Kirkwood | Date: | Tue, 31 Oct 2000 23:00:21 +0000 |
| Subject: | RE: limit search | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-4080@lists.php.net to get a copy of this message | ||
Watch out for AND and OR without brackets....
select BenchGLEnum, Bench_txt
from SunshineSS
where LENGTH(BenchGLEnum) < 11
AND ( BenchKey LIKE '%addition%' OR BenchKey LIKE
'%subtraction%' )
Cheers
Mark
> -----Original Message-----
> From: Adv. Systems Design [SMTP:asd_2000@yahoo.com]
> Sent: Wednesday, November 01, 2000 6:00 AM
> To: PHP List
> Subject: limit search
>
> 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/