Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Questions and Supports (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=18)
-   -   Snaplinks (http://www.mysidiaadoptables.com/forum/showthread.php?t=2411)

Hall of Famer 11-08-2011 04:30 PM

Umm now this is strange, your hosting package is not much worse than BMR's MA, so it should be good enough to handle an individual site.

TheShadow 11-08-2011 11:14 PM

Which is why I'm inclined to think it's not a server issue. It's now starting to affect adopts getting clicks as well, so pretty much everything is breaking down :c

I'm offering a $50 reward to whomever helps us fix this. It's a very serious issue D:

PokePets 11-09-2011 06:04 AM

What about updating the money 1x a day?
New field: Clicksdonetoday end then cronjob:
$rand (1,5)
$newmoney = clicksdonetoday x $rand
Update users money set money to $money + $newmoney

Just a fast example

Csar 11-13-2011 02:15 PM

Quote:

Originally Posted by TheShadow (Post 19570)
Which is why I'm inclined to think it's not a server issue. It's now starting to affect adopts getting clicks as well, so pretty much everything is breaking down :c

Maybe the problem is caused by mysql queues... Just try this:

Go to levelup.php [145] there should be 2 lines like this:

PHP Code:

    $newamount $GLOBALS['money'] + $reward;
    
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = '{$newamount}' WHERE `username` = '{$loggedinname}'"); 

Try replacing with this:
PHP Code:

    $newamount $GLOBALS['money'] + $reward;
    
runquery("UPDATE {$GLOBALS['prefix']}users SET `money` = `money`+{$reward} WHERE `username` = '{$loggedinname}'"); 

This will probably cause Mysql to just increase instead of overwriting. Worth a try?

EDIT: Is money a string? If so it'll probably not work... Hope it isn't like this. Otherwise you'll have to try adding a field that is called "lock" and that is changed to 1 at the beginning of the script and changed to 0 at the end. We'll also have to add some code to detect if the lock is activated and "sleep" 0.1 seconds and repeat the query...

TheShadow 11-16-2011 11:38 PM

Csar's solution works wonderfully. ^________^ Thank you so much ♥ (Please PM me your paypal?)

SilverDragonTears 12-02-2011 12:19 AM

I can't find this in my levelup.php....


All times are GMT -5. The time now is 08:18 PM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.