sql query

luckylutz

New Member
YetiShare User
Aug 30, 2012
147
0
0
44
Schwitzerland
www.hoodload.com
Hi Everybody with sql experience

i need a little bit help.
i need two sql querys.

im searching the query for how many space have a user in use and how many rewards have this user.

like this
<?php echo COUNT($fileFolders);
this works perfect.

Can everybody help me?
i rebuild the account settings page. that the user can see wath is going with his account

i need the echo for
space used
rewards

Thank you

 

ysmods

New Member
Jan 29, 2013
860
1
0
UK
www.ysmods.com
Something like this should work for the amount of files uploaded.
Code:
SELECT COUNT (*) FROM file WHERE userId ='USERS_ID' LIMIT 1;
As for total size, something like:
Code:
SELECT SUM(fileSize) FROM file WHERE userId = 'USERS_ID';
The MySQL query above will return the total bytes uploaded.

Swap out USERS_ID for the users ID number

As for rewards, I do not know as I don't have that plugin