$ 0 0 by Dan Poltawski. I'd copy the query which is used in the online users block to do this. I'm sure someone else here might have a query to share.