|
Posted by Kurt Yoder on 03/17/05 03:19
On Mar 15, 2005, at 11:24 AM, Richard Lynch wrote:
> BAD (probably):
>>>>> Select blablabla FROM t1,t2,t3
>>>>> WHERE customers LIKE '%$s%'
>>>>> OR name LIKE '%$s%'
>>>>> OR domain LIKE '%$s%'
>>>>> OR email LIKE '%$s%'
>>>>> OR log LIKE '%$s%'
>>>>> AND t1.id = t2.t1_id
>>>>> AND t1.id = t3.t1_id
>
> GOOD (usually):
>>>>> Select blablabla FROM t1,t2,t3
>>>>> WHERE (customers LIKE '%$s%'
>>>>> OR name LIKE '%$s%'
>>>>> OR domain LIKE '%$s%'
>>>>> OR email LIKE '%$s%'
>>>>> OR log LIKE '%$s%')
>>>>> AND t1.id = t2.t1_id
>>>>> AND t1.id = t3.t1_id
>
> Note parentheses added around OR expressions.
>
I see. Thanks for the info.
--
Kurt Yoder
http://yoderhome.com
[Back to original message]
|