AV1611 Posted February 4, 2008 Share Posted February 4, 2008 I have a table with this schema: idx name ip data is like this: 1 john 1.1.1.1 2 fred 2.2.2.2 3 john 1.1.1.1 4 john 2.3.3.4 etc. The point being that there are many duplicated of name/ip pairs. This query is SUPPOSED to grab the last 100 distinct names from the list, (for a pulldown list) but doesn't: Select distinct `name` from table order by `idx` desc; What am I missing? It gives 100 names, but they are not the last on the list... Link to comment https://forums.phpfreaks.com/topic/89393-solved-early-morning-confusion/ Share on other sites More sharing options...
AV1611 Posted February 4, 2008 Author Share Posted February 4, 2008 Sorry to waste your time. Two more sips of coffee revealed that I forgot to put limit 100 at the end, so I actually had the full list, not the last 100 Doh! Link to comment https://forums.phpfreaks.com/topic/89393-solved-early-morning-confusion/#findComment-457756 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.