News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

big problem in database, help me please

Started by drhamza, June 10, 2009, 08:01:00 AM

Previous topic - Next topic

drhamza

a section in my forum (which is the only one currently) called general discussion
topics are 0, though post are 50!!!
i opened it to find nothing
i tried to create a new topic and this is what showed:
Fatal error: Call to undefined function db_query() in /home2/jumssnet/public_html/forum/Sources/Post.php on line 404


user: tester
pass: tester


suspect mod: related topics (i uninstalled it by the way)


thank you very much

aED


drhamza


drhamza

phew, it works again

i deleted this part

//Just need for new topics.
if(empty($topic)) {
// Get a list of boards they can post in.
$boards = boardsAllowedTo('post_new');
if (empty($boards))
fatal_lang_error('cannot_post_new');
$request = db_query("
SELECT c.name AS catName, c.ID_CAT, b.ID_BOARD, b.name AS boardName, b.childLevel
FROM {$db_prefix}boards AS b
LEFT JOIN {$db_prefix}categories AS c ON (c.ID_CAT = b.ID_CAT)
WHERE $user_info[query_see_board]" . (in_array(0, $boards) ? '' : "
AND b.ID_BOARD IN (" . implode(', ', $boards) . ")"), __FILE__, __LINE__);
$context['post_boards'] = array();
while ($row = mysql_fetch_assoc($request))
//Build up the array.
$context['post_boards'][] = array(
'id' => $row['ID_BOARD'],
'name' => $row['boardName'],
'childLevel' => $row['childLevel'],
'selected' => $board == $row['ID_BOARD'],
'cat' => array(
'id' => $row['ID_CAT'],
'name' => $row['catName']
)
);
mysql_free_result($request);
}



the first time i did that the topics didn't show, but when i opened a new topic, they showed up

Advertisement: