bare with me here guys I've never used PHP strictly perl by trade and I've never hacked VBulletin ether so I'm not sure where to start what I'm trying to do should be simple
Code:
my @types = qw/lscripts presets plugins models/;
my %typeset;
foreach $type (@types) {
my $sth = $dbh->prepare("SELECT COUNT(*) FROM $type\_download WHERE $type\_author_id=?");
$sth->execute("$user{'userid'}");
$typeset{"$type"} = $sth->fetchrow;
}
Sorry for the perl i can translate the above into PHP but all I'm looking to do is return the typeset hash so it can be used with in the postbit template
As i say my PHP is limited and my knowledge of VBulletin is basically non existent, can someone point me in the right direction.
Thanks guys.