Perhaps this? :
SELECT u.username, u.id, u.lastvisitDate, c.user_id, c.avatar, c.cb_city, c.cb_country FROM #__comprofiler c, #__users u WHERE c.banned=0 AND c.avatar IS NOT NULL AND (u.id = c.user_id) ORDER BY u.lastvisitDate DESC
The lastvisitDate is actually in jos_users.
In the module backend, there's an entry called "CB Field to caption below each avatar." Use simply lastvisitDate in this field. That's not a CB field, but I was thinking about CB fields at the time, and it didn't occur to me that any field from the recordset returned by the query could be captioned, but it can.
Let me know if it works. Obviously, you'll want to change c.cb_city and c.cb_country to fields that are present in your database, and add whatever others you need.
Raj
Post edited by: Raj, at: 2006/09/02 23:24