Jump to content
MakeWebGames

jobpay.php problem


spellbyte ®

Recommended Posts

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

Link to comment
Share on other sites

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());
?>
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...