Reply to Re: [PHP] incrementing a number from a text file

Your name:

Reply:


Posted by Richard Lynch on 03/15/05 18:24

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация