List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:April 6 2002 4:08pm
Subject:Re: mysql and order in a query
View as plain text  
At 18:03 +0200 4/6/02, David yahoo wrote:
>Hi all,
>
>I d like  to order some links which are in 2 langauage (French/English).
>
>So i make this request in case a visitor select french in language so french
>links where on top in this case
>because "f"rench is after "e"nglish in alphabectical order.
>
>SELECT * FROM links WHERE Accepter LIKE 1 AND CatID LIKE 43 ORDER BY
>language DESC,Linkname ASC;
>
>And for english selection I make this.
>SELECT * FROM links WHERE Accepter LIKE 1 AND CatID LIKE 43 ORDER BY
>language ASC,Linkname ASC;
>
>If I like to introduce german by example, what kind of query i have to do to
>put french links on top
>asc->english
>desc->german.
>french ?
>
>Is there any way to put a sort order different than the alpahbetical order
>in string.
>
>A thing like that order "french","german" ....


ORDER BY ELT(language,'english','german','french'),Linkname ASC

>Thanks.
>
>
>query sql mysql

Thread
Help! Error in editing or creating columns...hedrickj5 Apr
  • Re: Help! Error in editing or creating columns...Victoria Reznichenko6 Apr
  • mysql and order in a queryDavid yahoo6 Apr
    • Re: mysql and order in a queryPaul DuBois6 Apr
      • RE: mysql and order in a queryRoger Baklund6 Apr
        • Re: mysql and order in a queryDavid yahoo6 Apr
        • RE: mysql and order in a queryPaul DuBois7 Apr