HakkieDEV
06-18-2004, 10:06 PM
Hi all,
I am using a postcounthack (the one of touchingvirus) and I wanted to show on forumhome the top10threadstarters in a specific forumid.
Well, this query works and shows the statistics of the members:
$stats10 = $DB_site->query('SELECT
`threadcount`.`userid`,`threadcount`.`count1`,
`user`.`userid`,`user`.`username` FROM threadcount, user
Where `user`.`userid`=`threadcount`.`userid` ORDER BY
`threadcount`.`count1` DESC LIMIT 0,10');
However, while it shows the threadcount, it doesn't link the userid to the username. (And, the username isn't being stored in the threadcount-table)
So, how do I combine this query with the user-table to display the username next to the threadcount?
I am using a postcounthack (the one of touchingvirus) and I wanted to show on forumhome the top10threadstarters in a specific forumid.
Well, this query works and shows the statistics of the members:
$stats10 = $DB_site->query('SELECT
`threadcount`.`userid`,`threadcount`.`count1`,
`user`.`userid`,`user`.`username` FROM threadcount, user
Where `user`.`userid`=`threadcount`.`userid` ORDER BY
`threadcount`.`count1` DESC LIMIT 0,10');
However, while it shows the threadcount, it doesn't link the userid to the username. (And, the username isn't being stored in the threadcount-table)
So, how do I combine this query with the user-table to display the username next to the threadcount?