lynm77 Posted June 22, 2012 Posted June 22, 2012 Hello All I'm getting the following error when attempting to hack account. 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 's bank account' where userid=1' at line 1 Query was update users set jailtime=106, jailreason='Caught trying to hack 's bank account' where userid=1 I have it installed on Mcodes V2 Here are a few lines of the Mod $jailtime=rand(30,150); $reason="Caught trying to hack {$r['username']}'s bank account"; $db->query("update users set jailtime=$jailtime, jailreason='$reason' where userid={$ir['userid']}"); }//end jailchance if else { Thanks Lynm77 Quote
danger boy Posted June 22, 2012 Posted June 22, 2012 Try this $jailtime=rand(30,150); $reason="Caught trying to hack {$r['username']} bank account"; $db->query("update users set jailtime=$jailtime, jailreason='$reason' where userid={$ir['userid']}"); }//end jailchance if else { Quote
JakeB Posted June 22, 2012 Posted June 22, 2012 the problem with that fix is it will cause grammatical errors which may bother some people. try this: $jailtime=rand(30,150); $reason="Caught trying to hack {$r['username']}\'s bank account"; $db->query("update users set jailtime=$jailtime, jailreason='$reason' where userid={$ir['userid']}"); }//end jailchance if else { Quote
danger boy Posted June 22, 2012 Posted June 22, 2012 No problem and yeah could use boohers way as well, either way will work. 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.