MyBB Community Forums

Full Version: how do i add forums using SQL?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi. i'm trying to add categories and forums using straight SQL statements in phpMyAdmin. i insert the correct data into the FORUMS table, but a maximum of only 2 enteries show up when i load the page (1 category and 1 forum) even if i've added a whole lot of categories and forums.

Here's an example of what i'm trying. You'll notice that there's 1 category, and 2 forums within that category. when i load the page, the last forum (which is Forum2) does not show up even though the correct data is in the mybb_forums table.

INSERT INTO mybb_forums (fid, name, description, linkto, type, pid, parentlist, disporder, active, open, threads, posts, lastpost, lastposter, lastposttid, allowhtml, allowmycode, allowsmilies, allowimgcode, allowpicons, allowtratings, status, usepostcounts, password, showinjump, modposts, modthreads, modattachments, style, overridestyle, rulestype, rulestitle, rules) VALUES (1, 'Category1', '', '', 'c', 0, '1', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', ''),
(2, 'Forum1', '', '', 'f', 1, '1,2', 1, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', ''),
(3, 'Forum2', '', '', 'f', 1, '1,3', 2, 1, 1, 0, 0, 0, '0', 0, 0, 1, 1, 1, 1, 1, 1, 1, '', 1, 0, 0, 0, 0, 0, 0, '', '');

EDIT: I now suspect that it might have something to do with the datacache?!
EDIT2: Solved... well kind of. I need to call $cache->update_forums(); after executing the SQL query.