MyBB Community Forums

Full Version: Cash mod - Recount Cash
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
When I click 'recount cash' in the Admin CP, I get this error:

Quote:mySQL error: 1064
You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE pid = '1'' at line 1
Query: UPDATE mybb_polls SET polls_cash = WHERE pid = '1'
And all my cash gets reset to 0.00

Another question: Does it update all Gold a user SHOULD HAVE received in the past? For example: a user has 50 posts worth 1 Gold each, so he gets 50 Gold. And does this include posts in forums that give you more Gold for a post?

Suggestion for future update:
Ability to set an amount of Gold a user receives for every reply on a thread he created.
By any chance have you set your poll amount to 0 (either by default or in that particular forum)? If no then it's a worry. If yes then ok Smile

$db->query("UPDATE " . TABLE_PREFIX . "polls SET polls_cash = " . $cash_mod_poll . " WHERE pid = '" . $poll['pid'] . "'");

$db->query("UPDATE " . TABLE_PREFIX . "polls SET polls_cash = '" . $cash_mod_poll . "' WHERE pid = '" . $poll['pid'] . "'");

That will stop those errors. If you have specified a poll amount then the polls will not be counted because of the bug mentioned above.
what do you mean with poll amount?

Money per new poll = 2.00
Money per poll vote = 1.00
Money per multiple vote per poll = -1

are my settings

And what do I do with the codes?
Do I have to modify them somewhere? If so, where? :$
Problem solved, sorry for trouble Smile
hmmm. You still stuck? Got your PM.
xiao Wrote:Problem solved, sorry for trouble Smile
How did you solve the problem? :neutral:
IMPAQ Wrote:
xiao Wrote:Problem solved, sorry for trouble Smile
How did you solve the problem? :neutral:

Search for
Quote:$db->query("UPDATE " . TABLE_PREFIX . "polls SET polls_cash = " . $cash_mod_poll . " WHERE pid = '" . $poll['pid'] . "'");
in your cash mod file.

and replace it by
Quote:$db->query("UPDATE " . TABLE_PREFIX . "polls SET polls_cash = '" . $cash_mod_poll . "' WHERE pid = '" . $poll['pid'] . "'");

If I can remember well Shy