BGDeveloper, on 28 Nov, 2009 - 08:34 AM, said:
Okay, I've write you a simple function for this.
All you have to do is to call it by parsing the user id.
where $userid will be variable with each unique id. I hope you've got the idea.
<?php
function count_thanks($userid)
{
$sql = "SELECT COUNT(`post_thanks_thanked_times`) AS `thanks_count` FROM `users` WHERE `userid` = {$userid}";
$query = mysql_query($sql);
$result = mysql_fetch_array($query);
return $result['thanks_count'];
}
?>
All you have to do is to call it by parsing the user id.
Quote
print count_thanks($userid)
where $userid will be variable with each unique id. I hope you've got the idea.
Yes i get your idea i will have to try add the template you just made to vbulletin then so it passes the varabiles i will let you know how i get on

New Topic/Question
Reply





MultiQuote


|