Bennyh789 Posted September 28, 2011 Share Posted September 28, 2011 Hi all, I brought some premade crimes and crime groups from someone on here, i told him about the errors and he blocks me from msn, when I enter them into phpmyadmin I get the following error message: #1064 - 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 4 The sql im using is: INSERT INTO `crimes` (`crimeID`, `crimeNAME`, `crimeBRAVE`, `crimePERCFORM`, `crimeSUCCESSMUNY`, `crimeSUCCESSCRYS`, `crimeSUCCESSITEM`, `crimeGROUP`, `crimeITEXT`, `crimeSTEXT`, `crimeFTEXT`, `crimeJTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeXP`) VALUES (1, 'Search the Bins for Cash', 2, '(WILL*1000/1)', 6, 0, 0, 1, 'You walk around looking for a bin to search for cash!<br/>', '<font color=green>You begin moving rubbish inside the bin,<br/>\r\n\r\nThen you find a burger wrapper in the bin with <b>${money}</b> scrunched inside!</font>\r\n\r\n', '<font color=brown>You begin moving rubbish inside the bin,<br/>\r\n\r\nYou feel the bottom of the bin and realise their is nothing inside.</font> ', '<font color=red>You begin moving rubbish inside the bin,<br/>\r\n\r\nThen you hear <b>OI!</b>, <br/>\r\n\r\nYou run ,But you couldn''t hide no where! "Your Nicked!"</font> ', 2, 'Caught looting the bins', 0.5000), This is just one of the crimes I have paid and recieved 50, but im sure if i find out what is wrong with this one it would be the same for the rest of them Thankyou in advance Ben Quote Link to comment Share on other sites More sharing options...
Mystical Posted September 28, 2011 Share Posted September 28, 2011 (edited) I suck at coding but I think you need a ; after VALUES on the first string and a ; at the end of the second string instead of a , I could be wrong. On second look you seem to be missing part of the first string.... After Values there should be something that looks like this (1, 'Standard Crimes', 1); Edited September 28, 2011 by Mystical Quote Link to comment Share on other sites More sharing options...
Gambit Posted September 28, 2011 Share Posted September 28, 2011 But you couldn''t should become But you couldn\' What mystical says is true but the ; needs only to be after the last set of values. so on line 50 in your case Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 28, 2011 Share Posted September 28, 2011 You need to escape the "couldn't"... It should go in the DB as "couldn\'t" and strip slashes when displaying the message Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted September 28, 2011 Author Share Posted September 28, 2011 (edited) Thanks all however I tried and I still get the below: Error SQL query: INSERT INTO `crimes` ( `crimeID` , `crimeNAME` , `crimeBRAVE` , `crimePERCFORM` , `crimeSUCCESSMUNY` , `crimeSUCCESSCRYS` , `crimeSUCCESSITEM` , `crimeGROUP` , `crimeITEXT` , `crimeSTEXT` , `crimeFTEXT` , `crimeJTEXT` , `crimeJAILTIME` , `crimeJREASON` , `crimeXP` ) VALUES ; MySQL said: #1064 - 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 I ran the query: INSERT INTO `crimes` (`crimeID`, `crimeNAME`, `crimeBRAVE`, `crimePERCFORM`, `crimeSUCCESSMUNY`, `crimeSUCCESSCRYS`, `crimeSUCCESSITEM`, `crimeGROUP`, `crimeITEXT`, `crimeSTEXT`, `crimeFTEXT`, `crimeJTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeXP`) VALUES; * * (1, 'Search the Bins for Cash', 2, '(WILL*1000/1)', 6, 0, 0, 1, 'You walk around looking for a bin to search for cash!', '<font color=green>You begin moving rubbish inside the bin,\r\n\r\nThen you find a burger wrapper in the bin with <b>${money}</b> scrunched inside!</font>\r\n\r\n', '<font color=brown>You begin moving rubbish inside the bin,\r\n\r\nYou feel the bottom of the bin and realise their is nothing inside.</font>*************** ', '<font color=red>You begin moving rubbish inside the bin,\r\n\r\nThen you hear <b>OI!</b>, \r\n\r\nYou run ,But you couldnt hide no where! "Your Nicked!"</font>******************* ', 2, 'Caught looting the bins', 0.5000), Edited September 28, 2011 by Bennyh789 Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 28, 2011 Share Posted September 28, 2011 Escape these as well "Your Nicked!" Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted September 28, 2011 Author Share Posted September 28, 2011 I still get the error message: #1064 - 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 Sorry to be a pain all this was after taking the " out of your nicked I just don't understand it Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 28, 2011 Share Posted September 28, 2011 (edited) INSERT INTO `crimes` (`crimeID`, `crimeNAME`, `crimeBRAVE`, `crimePERCFORM`, `crimeSUCCESSMUNY`, `crimeSUCCESSCRYS`, `crimeSUCCESSITEM`, `crimeGROUP`, `crimeITEXT`, `crimeSTEXT`, `crimeFTEXT`, `crimeJTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeXP`) VALUES (1, 'Search the Bins for Cash', 2, '(WILL*1000/1)', 6, 0, 0, 1, 'You walk around looking for a bin to search for cash!', '<font color=green>You begin moving rubbish inside the bin,Then you find a burger wrapper in the bin with <b>${money}</b> scrunched inside!</font>', '<font color=brown>You begin moving rubbish inside the bin,You feel the bottom of the bin and realise their is nothing inside.</font>', '<font color=red>You begin moving rubbish inside the bin,Then you hear <b>OI!</b>, You run ,But you couldnt hide no where! \"Your Nicked!\"</font>', 2, 'Caught looting the bins', '0.5000') Edited September 28, 2011 by Lithium Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted September 28, 2011 Author Share Posted September 28, 2011 Lithium thanks very much for you help however I still get the same error message as above :-( Quote Link to comment Share on other sites More sharing options...
Bennyh789 Posted September 28, 2011 Author Share Posted September 28, 2011 Sorry I now get this error message: #1064 - 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 'Â* (1, 'Search the Bins for Cash', 2, '(WILL*1000/1)', 6, 0, 0, 1, 'You walk aro' at line 2 Quote Link to comment Share on other sites More sharing options...
Damagedcity.com Posted September 28, 2011 Share Posted September 28, 2011 I was the one who was selling it ... I did not scam this guy because he did not pay me first of all... and i said i will fix it for him but my friend had an accident in the morning ..and i had to go to the hosp...and tonight ill have to stay with him as his parents are away from town im posting this frm my phone i din block u on MSN i mailed u back ..just few mins ago Quote Link to comment Share on other sites More sharing options...
Lithium Posted September 28, 2011 Share Posted September 28, 2011 Lithium thanks very much for you help however I still get the same error message as above :-( Then you have some problem somewhere... The query i pasted last works with no problem... Quote Link to comment Share on other sites More sharing options...
Smokey Posted September 28, 2011 Share Posted September 28, 2011 (edited) INSERT INTO `crimes` (`crimeID`, `crimeNAME`, `crimeBRAVE`, `crimePERCFORM`, `crimeSUCCESSMUNY`, `crimeSUCCESSCRYS`, `crimeSUCCESSITEM`, `crimeGROUP`, `crimeITEXT`, `crimeSTEXT`, `crimeFTEXT`, `crimeJTEXT`, `crimeJAILTIME`, `crimeJREASON`, `crimeXP`) VALUES (1, 'Search the Bins for Cash', 2, '(WILL*1000/1)', 6, 0, 0, 1, 'You walk around looking for a bin to search for cash!', '<font color=green>You begin moving rubbish inside the bin,Then you find a burger wrapper in the bin with <b>${money}</b> scrunched inside!</font>', '<font color=brown>You begin moving rubbish inside the bin,You feel the bottom of the bin and realise their is nothing inside.</font>', '<font color=red>You begin moving rubbish inside the bin,Then you hear <b>OI!</b>, You run But you couldnt hide no where! \"Your Nicked!\"</font>', 2, 'Caught looting the bins', '0.5000'); Try this.. Edited September 28, 2011 by Smokey Quote Link to comment Share on other sites More sharing options...
bineye Posted September 29, 2011 Share Posted September 29, 2011 Have you tried setting up the table in phpmyadmin and inputting from the insert form for the table? Seem's like that would solve all problems... 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.