Hi First, unless there is a compelling reason not to, I'd suggest you use a single date field, instead of separate year, month, day columns. It will be much more efficient on space and indexes. Then, based on your own query, use: SELECT DISTINCT ip, date FROM tracker WHERE page = 'index' ORDER BY date DESC LIMIT 0,20 Niel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php