Jump to content

Problem with DISTINCT() and multiple columns


sw0o0sh

Recommended Posts

I have a table called RSCD_TRAPS (it's for a game).

The columns are as follows:

id, user, time, ip, details

 

I'm trying to do this query, (in combination with PHP):

SELECT DISTINCT(user),id,time,details FROM rscd_traps

 

However, it still will call non-distinct results for user. What am I doing wrong? I'm trying to basically fetch DISTINCT(user), and the corresponding columns that go along with it, however it ends up fetching the entire thing. Is there anyway to do this in 1 query?

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.