spellbyte ® Posted November 15, 2006 Share Posted November 15, 2006 I have recently come across a problem with the jobpay cron file, it seems to be paying out money and stats to users who dont even have a job this is what i have at the moment <?php require "mysql.php"; global $c; mysql_query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY,us.strength=us.strength+jr.jrSTRG,us.labour=us.labour+jr.jrLABOURG,us.IQ=us.IQ+jr.jrIQG,u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0",$c) or die("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY,us.strength=us.strength+jr.jrSTRG,us.labour=us.labour+jr.jrLABOURG,us.IQ=us.IQ+jr.jrIQG WHERE u.job > 0 AND u.jobrank > 0 ".mysql_error()); ?> I can only assume that it is this that is causing the problem of stats raising randomly and also they seem to be decreasing randomly too, if anyone has any thoughts i would be greatly appreciative Quote Link to comment Share on other sites More sharing options...
SilverWolf Posted November 15, 2006 Share Posted November 15, 2006 Re: jobpay.php problem This is what i have. idk if its he same or not.... i dont have any problems with it. <?php require "mysql.php"; global $c; mysql_query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY,us.strength=us.strength+jr.jrSTRG,us.labour=us.labour+jr.jrLABOURG,us.IQ=us.IQ+jr.jrIQG,u.exp=u.exp+(jr.jrPAY/20) WHERE u.job > 0 AND u.jobrank > 0",$c) or die("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON u.jobrank=jr.jrID SET u.money=u.money+jr.jrPAY,us.strength=us.strength+jr.jrSTRG,us.labour=us.labour+jr.jrLABOURG,us.IQ=us.IQ+jr.jrIQG WHERE u.job > 0 AND u.jobrank > 0 ".mysql_error()); ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.