SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: query question

  1. #1
    SitePoint Guru Raskolnikov's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    query question

    table colum YEAR has these values in it

    2004,2004,2004,2004,2004,2005,2005,2005,2006

    is there a way i can do a query "WERE different" or something to that affect.

    I am making a drop down menu based on the year, and crurrently the menu displays every year....so it shows 2004 5 times, 2005 3 times, and 2006 one time, where i would like them each to show only once.

    thanks guys.

  2. #2
    SitePoint Guru
    Join Date
    Jan 2004
    Location
    Uppsala, sverige
    Posts
    698
    Mentioned
    2 Post(s)
    Tagged
    1 Thread(s)
    Code:
    select distinct year from t

  3. #3
    SitePoint Guru Raskolnikov's Avatar
    Join Date
    Jul 2003
    Location
    USA
    Posts
    606
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by swampBoogie
    Code:
    select distinct year from t
    thanks buddy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •