leaders only after 3 votes

Hello everybody,

the profiles appear in leaders only after 3 votes.

I want to change it, so that 1 vote is enough to appear in leaders.

I tryed it in the BxDolVotingQuery.php at line 121 at:

return $this->getOne ("SELECT $sTable.`{$sPre}id`, COUNT($sTable.`{$sPre}id`) AS `voting_count` FROM {$sTable} $sJoin WHERE TO_DAYS(NOW()) - TO_DAYS($sTable.`{$sPre}date`) <= $iDays $sWhere GROUP BY $sTable.`{$sPre}id` HAVING `voting_count` > 2 ORDER BY `voting_count` DESC LIMIT 1");


and changed it to:

return $this->getOne ("SELECT $sTable.`{$sPre}id`, COUNT($sTable.`{$sPre}id`) AS `voting_count` FROM {$sTable} $sJoin WHERE TO_DAYS(NOW()) - TO_DAYS($sTable.`{$sPre}date`) <= $iDays $sWhere GROUP BY $sTable.`{$sPre}id` HAVING `voting_count` > 0 ORDER BY `voting_count` DESC LIMIT 1");

but it does not work !!!

What i have to change so that the profiles appear in leaders after 1 vote ?

Best regards sanne

Quote · 26 Feb 2010

Hello!

Possible in $iDays this profile hasn't votes? Print this query and check what this query returns. Because ur modifications seems to be correct.

Regard

Quote · 26 Feb 2010

This mod (>0) I posted in another topic is working just fine for me...

Life is a fatal disease, sexually transmissible - Virginity is carcinogenic! Ask here for vaccine.
Quote · 26 Feb 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.