how to combine 2 SQL queries

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • reteset
    Indigo Rose Customer
    • May 2006
    • 1688

    how to combine 2 SQL queries

    i am not sure to write this question under this section
    but it can be related with SQLite plugin

    well my question is:

    how can i combine two SQL queries like below


    "SELECT * FROM customers ORDER BY ID DESC"
    "SELECT * FROM customers ORDER BY JOINDATE ASC"

    simly : i want tu use JOINDATE ASC and ID DESC in one query string

    maybe it was simple but i could not figure it out,because my brain is not working for now

    thanks for your help
    amsplugins.com Is Closed.

    Facebook Page
  • Dermot
    Indigo Rose Customer
    • Apr 2004
    • 1790

    #2
    You can sort on more than one column like this.

    Code:
    SELECT * FROM customers ORDER BY ID DESC, JOINDATE ASC
    Dermot

    I am so out of here :yes

    Comment

    • reteset
      Indigo Rose Customer
      • May 2006
      • 1688

      #3
      You saved my life
      thank you very much
      amsplugins.com Is Closed.

      Facebook Page

      Comment

      Working...
      X