How to add thread manually to DB? [message #27680] |
Tue, 20 September 2005 08:59  |
Andriy
 Messages: 4 Registered: September 2005 Location: Kolomna, Russia
Karma: 0
|
Junior Member |
|
|
I need to write script to import data from my old bulletin board (self written) to FUDforum. But i've met with an obstacle - i cant insert new threads manually to DB.
My actions:
1. Insert new record to prefix_thread table (associated with root_message).
2. Insert messages (root_message and others) to prefix_msg.
3. Write data to messages/msg_X0000 (where X is a forum_id)
4. Insert record to prefix_tv_X (where X is a forum_id).
But if i run script doing these actions, all threads in FUDforum disappear or dont appear.
Maybe i've missed something?
[Updated on: Tue, 20 September 2005 09:00] Report message to a moderator
|
|
|
Re: How to add thread manually to DB? [message #27682 is a reply to message #27680] |
Tue, 20 September 2005 12:58   |
Ilia
 Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
The easiest way is to use the FUDforum API that has functions to adding topics and messages. You can find the API inside scripts/fudapi.inc.php
FUDforum Core Developer
|
|
|
|