gurpreet Posted January 17, 2009 Share Posted January 17, 2009 So I fixed my job pay / job stat gains every day. QUERY ERROR: 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 'jrID=19' at line 1 Query was UPDATE jobranks SET jrNAME='Leader', jrJOB = 6, jrPAY= 50000, jrIQG=300, jrLABOURG=700, jrSTRG=900, jrIQN=1000, jrLABOURN=2000, jrSTRN=10000WHERE jrID=19 That's what I get when editing a job rank. Here's the first part of my function job rank edit global $db,$ir,$userid; if ( $_POST['stage2']) { $db->query("UPDATE jobranks SET jrNAME='{$_POST['jrNAME']}', jrJOB = {$_POST['jrJOB']}, jrPAY= {$_POST['jrPAY']}, jrIQG={$_POST['jrIQG']}, jrLABOURG={$_POST['jrLABOURG']}, jrSTRG={$_POST['jrSTRG']}, jrIQN={$_POST['jrIQN']}, jrLABOURN={$_POST['jrLABOURN']}, jrSTRN={$_POST['jrSTRN']}WHERE jrID={$_POST['jrID']}"); print "Job rank updated! Any ideas? Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted January 18, 2009 Share Posted January 18, 2009 Re: Job Rank editing. global $db, $ir, $userid; if($_POST['stage2']) { $sql = sprintf("UPDATE jobranks SET jrNAME = '%s', jrJOB = '%u', jrPAY = '%u', jrIQG = '%u' jrLABOURG = '%u', jrSTRG = '%u', jrIQN = '%u', jrLABOURN = '%u', jrSTRN = '%u' WHERE jrID = '%u' ", ($_POST['jrNAME']), ($_POST['jrJOB']), ($_POST['jrPAY']), ($_POST['jrIQG']), ($_POST['jrLABOURG']), ($_POST['jrSTRG']), ($_POST['jrIQN']), ($_POST['jrLABOURN']), ($_POST['jrSTRN']), ($_POST['jrID'])); mysql_query($sql); echo "Job rank updated! Quote Link to comment Share on other sites More sharing options...
gurpreet Posted January 18, 2009 Author Share Posted January 18, 2009 Re: Job Rank editing. Thanks for this, +1. 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.