![]() |
![]() ![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 2 Pomógł: 0 Dołączył: 22.05.2008 Ostrzeżenie: (0%) ![]() ![]() |
Witam!
Stoi przedemną trudne zadanie. Muszę przekonwertować bazę danych z phpbb by przemo do innego skryptu(forum wbudowane w system Slaed CMS 4.3 PRO) Jak wiadomo w phpbb by przemo tematy znajdują się w 3 tabelach: posts, posts_text i topics struktura topic(mam ok.5000 wartości): CODE `topic_id` mediumint(8) unsigned NOT NULL auto_increment, `forum_id` smallint(5) unsigned NOT NULL default '0', `topic_title` varchar(60) NOT NULL default '', `topic_poster` mediumint(8) NOT NULL default '0', `topic_time` int(11) NOT NULL default '0', `topic_views` mediumint(8) unsigned NOT NULL default '0', `topic_replies` mediumint(8) unsigned NOT NULL default '0', `topic_status` tinyint(1) NOT NULL default '0', `topic_vote` tinyint(1) NOT NULL default '0', `topic_type` tinyint(1) NOT NULL default '0', `topic_first_post_id` mediumint(8) unsigned NOT NULL default '0', `topic_last_post_id` mediumint(8) unsigned NOT NULL default '0', `topic_moved_id` mediumint(8) unsigned NOT NULL default '0', `topic_attachment` tinyint(1) NOT NULL default '0', `topic_icon` tinyint(2) unsigned NOT NULL default '0', `topic_expire` int(11) NOT NULL default '0', `topic_color` varchar(8) default NULL, `topic_title_e` varchar(100) NOT NULL default '', `topic_action` tinyint(1) default NULL, `topic_action_user` mediumint(8) NOT NULL default '0', `topic_action_date` int(11) NOT NULL default '0', `topic_tree_width` smallint(2) NOT NULL default '0', struktura posts(80000 wartości) CODE post_id mediumint(8) UNSIGNED topic_id mediumint(8) UNSIGNED forum_id smallint(5) UNSIGNED poster_id mediumint(8) post_time int(11) poster_ip varchar(8) utf8_general_ci post_username varchar(25) utf8_general_ci enable_bbcode tinyint(1) enable_html tinyint(1) enable_smilies tinyint(1) enable_sig tinyint(1) post_edit_time int(11) post_edit_count smallint(5) UNSIGNED post_attachment tinyint(1) user_agent varchar(255) utf8_general_ci post_icon tinyint(2) UNSIGNED post_expire int(11) reporter_id mediumint(8) post_marked enum('n', 'y') utf8_general_ci post_approve tinyint(1) poster_delete tinyint(1) post_edit_by mediumint(8) post_parent mediumint(8) post_order mediumint(8) struktura post_text(ok 80000 wartości) CODE post_id mediumint(8) UNSIGNED bbcode_uid varchar(10) utf8_general_ci post_subject varchar(60) utf8_general_ci post_text text utf8_general_ci Tak NULL A wszystko to muszę umieścić w jednej tabeli ze strukturą: CODE `id` int(11) NOT NULL auto_increment, `pid` int(11) NOT NULL default '0', `catid` int(11) NOT NULL default '0', `uid` int(11) NOT NULL default '0', `name` varchar(25) NOT NULL default '', `title` varbinary(100) default NULL, `time` datetime default NULL, `hometext` text, `field` text NOT NULL, `comments` int(11) default '0', `counter` int(11) NOT NULL default '0', `score` int(11) NOT NULL default '0', `ratings` int(11) NOT NULL default '0', `ip_send` varchar(60) default NULL, `l_uid` int(11) NOT NULL default '0', `l_name` varchar(25) NOT NULL default '', `l_id` int(11) NOT NULL default '0', `l_time` datetime default NULL, `e_uid` int(11) NOT NULL default '0', `e_ip_send` varchar(60) default NULL, `e_time` datetime default NULL, `status` int(1) NOT NULL default '0', Forum z tego skryptu działa w następujący sposób. Jeśli się dodaje nowy temat zapisuje się on jako nowy post w tabeli forum i ma on wartość dla pid(post id) 0. Jeśli jest to odpowiedź w danym temacie to wartość pid ma id tego tematu. I nie umiem sobie uporać z konwersją tej bazy aby działała na tym forum. Chciałbym zaznaczyć, że portal ma rudzić 1 stycznia (o godzinie 00.00). Jest to dość duzy portal graficzny, którego wyczekuje wiele ludzi, więc dzisłające forum byłoby mile widziane. Czy widzicie szansę na skuteczną konwersję z tak skomplikowaną sytuacją.? Pozdrawiam Adam PS Jeśli by ktoś był w stanie pomóc to możliwa jest nagroda ![]() Temat do kosza, pomogłą mi juz pewna osoba z forum ![]() Ten post edytował Adamkac 1.01.2009, 00:24:19 |
|
|
![]() ![]() |
![]() |
Wersja Lo-Fi | Aktualny czas: 14.08.2025 - 12:55 |