Re: incrementing a number from a text file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux