![]() |
Use this code:
PHP Code:
|
I think that will work great... i haven't tried yet.
Will that order the users from 1-10 by total amount of user then sum the total of all of them at the buttom? btw thanks for the code :) |
nope didn't work giving this error
Invalid SQL: SELECT `user`, `amount`, SUM(`amount`) AS `total` FROM `donation` ORDER BY `amount` DESC LIMIT 10 mysql error: Table 'forum.donation' doesn't exist i have the amount in the user table under field amount? |
I thought you already had the donation table created...
|
no i just have a field under the table user called amount which is where I put the amount of the donation.
? |
Umm the archive hack of which the structure for was taken from my hack. Anyways
|
Any hoo, though I am 100% sure it was you, you posted this thread to get help, so it doesn't matter anyways.
|
I never did a file achieve hack...i think you are thinking of someone else ?
|
but anyways going back to that script..
I made the donations table with fields (user, amount) it now displays them in a list but it don't sort them or sum the amounts for each user and put them into a top 10. also the total amount at the buttom don't work. I have to change ORDER BY to GROUP BY or i got an error Invalid SQL: SELECT `user`, `amount`, SUM(`amount`) AS `total` FROM `donation` ORDER BY `amount` DESC LIMIT 10 mysql error: Mixing of GROUP columns (MIN(),MAX(),COUNT()...) with no GROUP columns is illegal if there is no GROUP BY clause :( |
All times are GMT. The time now is 02:19 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|