Ragnar Posted August 9, 2008 Share Posted August 9, 2008 If you get.... 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 're not training when...' WHERE ff_id=4' at line 1 Query was UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=302, ff_lp_poster_name='nesqueen', ff_lp_t_id=210, ff_lp_t_name='You know you're not training when...' WHERE ff_id=4 when you reply to a thread, and it's still added, it get's generated when you reply to the thread that has a Apostrophe (') in the title. Replace $db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$_GET['reply']}, ff_lp_t_name='{$topic['ft_name']}' WHERE ff_id={$forum['ff_id']}"); with $db->query("UPDATE forum_forums SET ff_lp_time=unix_timestamp(), ff_posts=ff_posts+1, ff_lp_poster_id=$userid, ff_lp_poster_name='$u', ff_lp_t_id={$_GET['reply']}, ff_lp_t_name='{$_POST['ft_name']}' WHERE ff_id={$forum['ff_id']}"); to fix it. Quote Link to comment Share on other sites More sharing options...
Guest Anonymous Posted August 9, 2008 Share Posted August 9, 2008 Re: Fix to a forum bug: Apostrophe in thread title. http://uk3.php.net/mysql_real_escape_string Quote Link to comment Share on other sites More sharing options...
Ragnar Posted August 9, 2008 Author Share Posted August 9, 2008 Re: Fix to a forum bug: Apostrophe in thread title. Send that link to MCcodes who made the crummy code in the first place!! Every one who bought the script has that code. All I did was get rid of the annoying error, so it's no less secure than it already was. And buy the v2 of the script, fix every secure bug, and post a paid mod with all the search and replace codes to fix them! :-D Sell for $50 and after six sales and you'll start racking in the cash, and we'll all have a much more secure game!! :-D Quote Link to comment Share on other sites More sharing options...
POG1 Posted August 9, 2008 Share Posted August 9, 2008 Re: Fix to a forum bug: Apostrophe in thread title. htmlentles ? oh however its spelt 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.