chaoswar4u Posted August 10, 2007 Posted August 10, 2007 In staff panel if you use the edit job rank link you will enter for the information. When you submit the changes you get this error. 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=' at line 1 Query was UPDATE jobranks SET jrNAME='Captain', jrJOB = 3, jrPAY= 2000, jrIQG=26, jrLABOURG=26, jrSTRG=26, jrIQN=16225, jrLABOURN=16225, jrSTRN=16225WHERE jrID= The code around this is function jobrankedit() { 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 help would be great. Thx Quote
Decepti0n Posted August 10, 2007 Posted August 10, 2007 Re: Job edit bug in MCcode V2 help! put a space before 'where' Quote
chaoswar4u Posted August 10, 2007 Author Posted August 10, 2007 Re: Job edit bug in MCcode V2 help! Already tried that. It comes up with this error if you do that. 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 '' at line 1 Quote
Decepti0n Posted August 10, 2007 Posted August 10, 2007 Re: Job edit bug in MCcode V2 help! there's nothing set for $_POST['jrID'] then, at least I think Quote
AlabamaHit Posted October 13, 2007 Posted October 13, 2007 Re: Job edit bug in MCcode V2 help! put a space after where and also change WHERE jrID={$_POST['jrID']}"); to WHERE jrID={$_POST['jrJOB']}"); Quote
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.