Go to Post Totally agree on the fact that legal strategies are... legal. - Kevin Sevcik [more]
Home
Go Back   Chief Delphi > Technical > IT / Communications > Website Design/Showcase
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 01-02-2003, 14:23
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
MySQL query question

ok... I have a little problem.

I want to run a select query. Example:

SELECT DISTICT topic_id
FROM posts
ORDER BY topic_time DESC

now, as expected, the order by doesn' t do anything. (except making the topic id go descending)

but... if i go

SELECT DISTINCT topic_id, topic_time
FROM posts
ORDER BY topic_time DESC

I get the correct sort order, but now i have more than one rows for each topic_id (becuase the topic_time for the topic_id s are different)

So... If you don't get what I said above, I'll try to now explain in just english.

I want to select unique topic_id. However, i want to order them by topic_time. The topic_time for each topic_id is different.

Can anyone help?
__________________
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**
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Message Boards w/o MySQL iBob Website Design/Showcase 7 13-07-2003 02:00
my idea of a question forum... Ken Leung General Forum 12 30-11-2002 12:17
MnM EASY Question of the Day Winners! Mike Bonham General Forum 22 03-05-2002 21:21
Chief Delphi Site Question Mike Bonham General Forum 1 16-02-2002 22:18
Rookie Programmer has question about the default code DanL Programming 3 26-01-2002 19:59


All times are GMT -5. The time now is 16:20.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi