PDA

View Full Version : SQL queries for active members


dodjer42
09-08-2008, 04:34 AM
Hey all,

I want to query the forum sql tables to return the following:

Active members only and their:
* number of posts
* rank
* title

I haven't programmed PHP / MySQL queries for a DB as complex as vbulletin's some I'm not sure where to start.

Tks.

Kirk Y
09-08-2008, 07:10 PM
What do you mean by active members?

SELECT *
FROM " . TABLE_PREFIX . "users
WHERE lastvisit >= " . (TIMENOW - X * 86400) . "That would return the user table for users who have visited the forum in the past X days.