czcore Posted December 17, 2006 Share Posted December 17, 2006 Hi, i have problem with script Id like to use to fill in the databese with topics. It is about 1500 topics, so that is the reason why I need script to do the job.the skript (without cyklus) isCode:[code]include("connect.php"); $result = mysql_fetch_array(mysql_query("SELECT item_number FROM beacon_1 ORDER BY item_number LIMIT 1")); $item_number = $result["item_number"]; $b = mysql_fetch_array(mysql_query("SELECT item_name FROM items WHERE item_number = $item_number")); echo mysql_error(); $item_name = $b["item_name"]; echo "$item_name<br>"; include("connect_forum.php"); mysql_query("INSERT INTO phpbb_topics (forum_id, topic_title, topic_poster, topic_time, topic_first_post_id, topic_last_post_id) VALUES('1', '$item_name', '2', '1166223682', '$id', '$id')"); echo mysql_error(); $id++; $eee = mysql_fetch_array(mysql_query("SELECT topic_id FROM phpbb_topics WHERE topic_title = '$item_name'")); $topic_id = $eee["topic_id"]; mysql_query("INSERT INTO phpbb_posts (topic_id, forum_id, poster_id, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies) VALUES('$topic_id', '1', '2', '1166260956', 'd4478357', '1', '0', '1')"); echo mysql_error();[/code]in database everythinh seems ok, but on the web page is no content. can you see any problem? thanx a lot Quote Link to comment Share on other sites More sharing options...
fenway Posted December 18, 2006 Share Posted December 18, 2006 Seems ok? No errors of any kind? Quote Link to comment Share on other sites More sharing options...
czcore Posted December 18, 2006 Author Share Posted December 18, 2006 nop. no php or mysql error....database is filled and it looks just like when I add topic trough GUI Quote Link to comment Share on other sites More sharing options...
czcore Posted December 18, 2006 Author Share Posted December 18, 2006 Well, I have solved the problem. Table phpbb_topics_text must be filled too - there must be first post when you are starting a new topic. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.