Dukky Posted August 11, 2009 Posted August 11, 2009 ok i have been making a new crime system i get 1 errorr :| staff crimes : $db->query("INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP, crimeEXP) VALUES( '{$_POST['name']}', '{$_POST['brave']}', '{$_POST['percform']}', '{$_POST['money']}', {$_POST['crys']}, {$_POST['item']}, '{$_POST['group']}', '{$_POST['itext']}', '{$_POST['stext']}', '{$_POST['ftext']}', '{$_POST['jtext']}', {$_POST['jailtime']}, '{$_POST['jailreason']}', '{$_POST['crimexp']}', {$_POST['crimeexp']})"); as you can see i have inserted a new feild in the crimes crimeEXP can anyone tell me if that sql looks right as i got a little confused with the end query Thanks Quote
Dukky Posted August 11, 2009 Author Posted August 11, 2009 Re: Crimes and the error is 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 Query was INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP, crimeEXP) VALUES( 'test crime', '1', '((WILL*0.8)/2.5)+(LEVEL/4)', '1', 0, 0, '1', 'test', 'pass', 'fail', 'jail', 0, '0', '0', ) Quote
Lithium Posted August 11, 2009 Posted August 11, 2009 Re: Crimes You already got a reply for it on some other site ;) you have an extra , at the end of the result query... that is why its error'ing 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.