The Arcive of vBulletin Modifications Site. |
|
top posters over a 7 day period Details »»
|
|||||||||||||||||||||||||
how would i edit this query to show the top posters over a 7 day period?
[sql]$posts10 = $DB_site->query('SELECT userid,username,posts FROM user ORDER BY posts DESC LIMIT 5');[/sql] Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
*bump*
|
|
#3
|
|||
|
|||
|
Code:
SELECT userid, username, COUNT(*) as weekpostcount FROM post WHERE dateline > (UNIX_TIMESTAMP() - 7*24*60*60) GROUP BY username, userid ORDER BY weekpostcount DESC LIMIT 5 |
|
#4
|
||||
|
||||
|
altho i appreciate your help, the query is apart of something
PHP Code:
and [sql] $DB_site->query('SELECT userid,username,posts FROM user ORDER BY posts DESC LIMIT 5'); [/sql] being the string that query's the database, as you can see in the php box in the first post i don't apprear to make use of the function anywhere, which would mean that i got the rest of the hack somewhere else (of which i require no help with), being that this is the last obstacle before finish, i would say it's a matter of HELP ME FINISH btw your query didn't work
|
|
#5
|
||||
|
||||
|
Execute the query in phpmyadmin, it does work
|
|
#6
|
||||
|
||||
|
sorry should've been clearer, the query works fine in php my admin just not on the page
|
|
#7
|
||||
|
||||
|
Post the php code with query so we can help you.
|
|
#8
|
||||
|
||||
|
PHP Code:
Code:
<b>$topposters[username]</b> -$topposters[posts] |
|
#9
|
||||
|
||||
|
when i get access to my pc i'll post it up, thank you very much for all of your help thus far tho
|
![]() |
|
|