View Single Post

  #4 (permalink)  
Old 01-09-2008
Tamer Higazi
 
Posts: n/a
Default Re: problems ordering result by paramters (solved)

Neither of all....

select
eintrag,name,betreff,CONCAT(DAY(zeiteintrag),'.',M ONTH(zeiteintrag),'.',YEAR(zeiteintrag))
AS zeit,counter from guestbook where sprache in (2,1,3,4,5) ORDER BY
FIND_IN_SET(sprache,'2,1,3,4,5');




Tamer Higazi wrote:
> Hi!
> I have a table:
>
> +-------------+---------------------+------+-----+---------+
> | Field | Type | Null | Key | Default | |
> +-------------+---------------------+------+-----+---------+
> | eintrag | int(10) unsigned | NO | PRI | NULL |
> auto_increment |
> | aktivieren | tinyint(1) | NO | | 1 |
> |
> | name | varchar(100) | NO | | NULL |
> |
> | email | varchar(60) | NO | | NULL |
> |
> | betreff | varchar(100) | NO | | NULL |
> |
> | inhalt | text | NO | | NULL |
> |
> | sprache | tinyint(3) unsigned | NO | MUL | NULL |
> |
> | zeiteintrag | datetime | NO | | NULL |
> |
> | counter | int(10) unsigned | NO | | 0 |
> |
> +-------------+---------------------+------+-----+---------+
>
> I want to order the results by language (column sprache).
>
> select
> eintrag,name,betreff,CONCAT(DAY(zeiteintrag),'.',M ONTH(zeiteintrag),'.',YEAR(zeiteintrag))
> AS zeit,counter from guestbook where sprache in (2,1,3,4,5)"
>
> After the where clause you see the column "sprache". I want to get the
> output ordered in the order 2,1,3,4,5
>
> But the output doesn't make it. What did I make wrong?
>
>
> For any help and support, thank you. for any help, thank you in advance!
>
>
> Tamer

Reply With Quote