Out of curiosity I tested this, and I was able to get it to work as long as there are many to one type of relationship between category and userID like in my case:
PHP Code:
mysql> select userID, category, UPC from ad WHERE Type = 999 ORDER BY userID DESC, category ASC LIMIT 10;
+---------------+----------------------+-------+
| userID | category | UPC |
+---------------+----------------------+-------+
| zman | Spam | 91602 |
| zman | Cars & Trucks | 06854 |
| zman | Cars & Trucks | 06854 |
| zman | Cars & Trucks | 06854 |
| zman | Cars & Trucks | 06854 |
| yman | Drapes | 06854 |
| yman | Acorns | 90046 |
| xman | Spam | 90046 |
| xman | Acorns | 20007 |
| vman | Acorns | 60085 |
+---------------+----------------------+-------+
I hope that helps
Bookmarks