FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » add forums / groups to FUDForum directly through MySQL
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: add forums / groups to FUDForum directly through MySQL [message #12373 is a reply to message #12367] Wed, 06 August 2003 13:36 Go to previous messageGo to previous message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma:
Junior Member

Right, I know that.

However, I find FUDForum code hard to follow.. there are no comments of any sort in it that help me. I'm not insulting FUDForum, sometimes some of my code lacks well commented info in it as well.

However, I was just hoping that someone could tell me what SQL queries I would need to do to add a group + forum to FUDForum. Again, when I look at the conversion scripts, they seem to hit tons of FUD subroutines, and get data from them about adding Forums...

Do they just do a MAX and add a forum / group ID at the top of the chain? I have this from one conversion script:

$gid = q_singleval("SELECT id FROM ".$DBHOST_TBL_PREFIX."groups WHERE res='forum' AND res_id=".$id);
q("UPDATE ".$DBHOST_TBL_PREFIX."groups SET res_id=".$obj->forumid." WHERE id=".$gid);
q("UPDATE ".$DBHOST_TBL_PREFIX."group_resources SET resource_id=".$obj->forumid." WHERE group_id=".$gid);
q("UPDATE ".$DBHOST_TBL_PREFIX."forum SET id=".$obj->forumid." WHERE id=".$id);

Can I set my missing variables by doing another query that I don't see here? Such as $id and such? Can I get $id by just doing a MAX on a particular column? What about forumid and gid? Again, I can set these with MAX or what?

And, afterwords, do I have to do a consistancy check after it runs? If so, can I run this from bash?
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reimport Causing Indexing Problems
Next Topic: How to change additional smilley window size?
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Dec 03 20:06:19 GMT 2024

Total time taken to generate the page: 0.04005 seconds