Visualizzazione dei risultati da 1 a 5 su 5

Discussione: query complessa

  1. #1
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716

    query complessa

    si posso fare query con l'ORDER BY multiplo?
    ad esempio dovendo ordinare delle fatture per mese dell'anno e per numero fattura?
    in modo da avere:
    ottobre:
    fattura1
    fattura2
    fattura3
    settembre:
    fattura1
    fattura2
    fattura3

    invece di
    ottobre:
    fattura1
    fattura3
    fattura2
    settembre:
    fattura3
    fattura1
    fattura2

    ??? ho provato a mettere una cosa tipo ORDER BY mouth && num ma mi ignora completamente uno dei due campi...help!

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  2. #2
    ORDER BY month, num

  3. #3
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716
    tnks..e si potrebbe fare anche l'ordine differenziato? cioè il mese decrescente e il numero crescente...?

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

  4. #4
    sure! ORDER BY month DESC , num ASC

  5. #5
    Utente di HTML.it L'avatar di thitan
    Registrato dal
    Feb 2001
    Messaggi
    716
    grazie mille!!

    www.inter-rail.it
    travellers, not tourist
    Is cuma cá mhinice a théann tú ar strae; is é is tábhachtaí gurb áil leat do bhealach a aimsiú arís.

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.