View Single Post
  #5   Spotlight this post!  
Unread 01-02-2003, 17:53
Jack's Avatar
Jack Jack is offline
FIRST Scouting Network
AKA: Andrew Schenk
FRC #0201 (The FEDS)
Team Role: Alumni
 
Join Date: Feb 2002
Rookie Year: 2002
Location: Rochester Hills
Posts: 643
Jack is a jewel in the roughJack is a jewel in the roughJack is a jewel in the rough
Send a message via AIM to Jack
ya, it's phpBB... but is really just because i'm not that great as SQL.

anyways...

a[100, 101, 102, 103, 104] b[3, 8, 3, 1, 8]

the a&b are the fields and 100 -> 3 ; 101 -> 8 ; ... ; 104 -> 8

(that's my best way of making a table)

now, for the output, I want: 1, 3, 8

yet, I want them in the order of 8, 1, 3

as you can see, I want the numbers sorted by the 'a' field DESC but I don't want repeats in the b field.

actually what i'm trying to do is (you better know the phpBB table layout) is select the topic_id from phpbb_posts sorted by post_time with unique (no repeats) of the topic_id.

can anyone help?

PS: DISTINCT, DISTINCT ROW whatevery you like.
__________________
Team 201 - 2003 Great Lakes Semifinalists & 2003 Archimedes Division Finalists :|: Webmaster of www.feds201.com -> FBI Scouting
Winner of The 2003 ChiefDelphi Web Award for: User That Started The Most Non Chit Chat Threads
Winner of: 2003 FIRST Ventures with 5451.68 End Points

All about me: http://knehcsa.vze.com
**Check out the New FIRST Scouting Network**