PDA

View Full Version : help with postbit / postbit_legacy upload stats hack


Joe Pimms
03-09-2005, 05:08 AM
hello im haveing a problem with is code :

$usernumUploads = $DB_site->query_first("select count(*) as `uploaded` from ".TABLE_PREFIX."attachment where userid={$bbuserinfo['userid']}");

here is the template mod:
look for under postbit / postbit_legacy:
<div>
$vbphrase[posts]: $post[posts]
</div>

add under:

<div>
MY Files Uploaded: $usernumUploads
</div>


what im wanting to do is display under postbit template the total number of attachments a user has uploaded to my site. now when when i run this i get it saying "Array" why is that ?

im wanting a real count not like the other user stats hacks on here please help

please see error of pic

thanks

tgillespie
03-09-2005, 07:14 AM
<a href="http://us3.php.net/array" target="_blank">http://us3.php.net/array</a>

Count the values in the array.

Marco van Herwaarden
03-09-2005, 08:16 AM
MY Files Uploaded: $usernumUploads

should be:
MY Files Uploaded: $usernumUploads['uploaded']

Joe Pimms
03-09-2005, 11:22 AM
MY Files Uploaded: $usernumUploads

should be:
MY Files Uploaded: $usernumUploads['uploaded']

this did not work

Colin F
03-09-2005, 02:49 PM
this did not work
I'd have said the same as Marcoh64

Zachery
03-09-2005, 03:01 PM
Where is that query being run?

What file?

Joe Pimms
03-09-2005, 07:31 PM
this is being run on "functions_subscriptions.php" unless its the wrong file to edit ?

p.s.
sorry i was at work im now finished and im back now