php3-list | 2000051

Re: [PHP3] Priority From: a (mjta <email protected>)
Date: 05/01/00

Date sent: Mon, 1 May 2000 04:03:23 -0700 (PDT)

From: Sarose Joshi <<npguy2000 <email protected>>

To: php3 <email protected>

<color><param>7F00,7F00,7F00</param>> HI,

> I just tried this SQL in MYSQL

> select * from mainbak where keyword like "%travel%" OR keyword like

> "%nepal%"; I had indexed the keyword column, Probably "Nepal" Record

> will be first in the search result but I need "travel" at first &

> then "Nepal", How can I do this? Any suggestion or hints will be

> highly appreciated.

</color><FontFamily><param>Times New Roman</param><bigger> Try:

Select *, (keyword like "%Nepal%") as ordenac from mainbak where
keyword like "%travel%" or keyword like "%nepal%" order by ordenac
desc, keyword;

<nofill>

--
Miguel Joaquin Trujillo Alvarado - mjta <email protected>
      Las Palmas de Gran Canaria - http://www.arrakis.es/~mjta
                  Espa#a (Spain) - Entusiasta de C/C++, Unix, Delphi
                         ICQ UIN - 8066864

Resistence is futile. You will be owned. (Borgs)

-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>