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 ' 0, '', 'This is a test crime', 'Crime finished, You own!', 'Crime Failed, You a' at line 1
Query was
Any idea what I can do to fix this?Code:INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'Test Crime', '0', '((WILL*0.8)/2.5)+(LEVEL/4)', '', , 0, '', 'This is a test crime', 'Crime finished, You own!', 'Crime Failed, You are a failure', 'You got caught by the blue', 0, 'noob', 500);
Last edited by Jaan; 01-30-2010 at 04:17 AM. Reason: Please use code tags when you are posting your codes!
yes, before that zero, you have two commas, without a value, I assume it want a value there.
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
I dont really understand what to do now xD
you have to insert a zero, a null or a '' there, depending on the field type
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall
Okay, So far I understand, But I dont know where to insert that.
I suppose at the database, Yet I dont know where in the database.![]()
Orjan was refering to your query:
INSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'Test Crime', '0', '((WILL*0.8)/2.5)+(LEVEL/4)', '', , 0, '', 'This is a test crime', 'Crime finished, You own!', 'Crime Failed, You are a failure', 'You got caught by the blue', 0, 'noob', 500)Where " -----HERE-----" is needs to be a value of something, you can't leave it blank. In some of the fields you put '' but that one is blank which is why it's giving you an error you should put " -----HERE-----" as a blank string, throw in a numeric number (zero) or something so it doesn't give you an errorINSERT INTO crimes (crimeNAME, crimeBRAVE, crimePERCFORM, crimeSUCCESSMUNY, crimeSUCCESSCRYS, crimeSUCCESSITEM, crimeGROUP, crimeITEXT, crimeSTEXT, crimeFTEXT, crimeJTEXT, crimeJAILTIME, crimeJREASON, crimeXP) VALUES( 'Test Crime', '0', '((WILL*0.8)/2.5)+(LEVEL/4)', '', -----HERE-----, 0, '', 'This is a test crime', 'Crime finished, You own!', 'Crime Failed, You are a failure', 'You got caught by the blue', 0, 'noob', 500)
Oh okay! Got it fixed!
Thank you!![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks