MyBB Community Forums

Full Version: MySQL Errors when posting.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
One of my members has informed me that ever since we did the upgrade from 1.1.8 to 1.2, she's been hitting SQL errors in many of her attepts to post. I'm not sure if this is a known issue, or if there is any fix for it, but any help would be greatly appreciated.Smile
Site forums link.
Ouch!, what a bad error you have Sad

Can you please tell me how did you make diffrent colors in index ?
Forum Last Post

Thanks!
Other information about the issues she's having. Per a post made by her:
Quote:I made a new thread then just merged it. Then I realised I probably screwed up the crime scene for the BB people >_> sorry.

I hope that error message was enough for them.

Edit: Aha! The thread is still broken. Can't post replies. On the other hand you can merge into it.
Can you open up inc/db_mysql.php and find:
	function escape_string($string)
	{
		if(function_exists("mysql_real_escape_string"))
		{
			$string = mysql_real_escape_string($string);
		}
		else
		{
			$string = addslashes($string);
		}
		return $string;
	}

Replace it with:
	function escape_string($string)
	{
		$string = addslashes($string);
		return $string;
	}

Let me know if you then have the first problem then (attempt to post a message containing ')
Sure thing, I'll try it right now and post my results. Thanks Chris.Smile
Edit: OK, made a test post here, and it seemed to go OK. The one thing I've noticed is during the conversion, any old posts that had apostrophe's in them were replaced by some unknown character, but any posts made after the upgrade containing apostrophes seemed to be ok. Anyways, I've asked the member to attempt to post in that thread as normal, and hopefully it will go ok.Smile