MyBB Community Forums

Full Version: sql error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I just transfered host and put in the tables myself plus the files. What file is messed up and needs fixing?

thanks
Warning: Division by zero in /home/ajheat34/public_html/forums/inc/functions.php on line 242
mySQL error: 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
Query: SELECT t.*, (t.totalratings/t.numratings) AS averagerating, i.name AS iconname, i.path AS iconpath, t.username AS threadusername, u.username FROM mybb_threads t LEFT JOIN mybb_icons i ON (i.iid = t.icon) LEFT JOIN mybb_users u ON (u.uid = t.uid) WHERE t.fid='3' AND t.visible='1' ORDER BY t.sticky DESC, lastpost DESC LIMIT 0, 
i get it when accessing a forum

http://marlinsclubhouse.net/forums
anyone?
This is the code that is in that line of text.

		$pages = $count / $perpage;

So you might want to resync your boards.
after that line, add:

die($count.$perpage);

and tell us what it says.
thanks for the replies, k776 when i added it to the functions.php i went back to the page and it said

Warning: Division by zero in /home/ajheat34/public_html/forums/inc/functions.php on line 242
240

thank you
Hmm, 240. Odd. Change
die($count.$perpage);
to
die($count." - ".$perpage);
then go to /inc/functions.php with that code still there. It should display two numbers.
dont i have to do those edits in functions.php? Why go back to see the two numbers?

also i get this error now...i think i know what the problem is. When i click on the menu links at top i get directed to http://domain.com/memberlist.php instead of http://domain.com/forums/memberlist.php.

Right, after talking to rage on MSN, and getting FTP/phpMyAdmin/Admin CP access, it was discovered that settings.php was not writable. This was causing all of the problems above plus some. After uploading a proper file, making it writable, and update the settings, everything is back to normal for rage. Enjoy myBB rage.
thanks a lot k776