I write it means a database converter from dle->wordpress , simple, nyusonli. The question is how to insert this piece of code into the loop so that it pulls out not only the first record in the database, but everything? Do While (?);
// Коннект к базе DLE $db_dle = mysql_connect("localhost", "vf", ""); mysql_select_db("vf", $db_dle); // Вытаскивание из БД DLE $result_dle = mysql_query("SELECT * FROM dle_post", $db_dle); $array_dle = mysql_fetch_array($result_dle); // Коннект к базе WP $db_wp = mysql_connect("localhost", "social", ""); mysql_select_db("social", $db_wp); // Ввод в БД WP $addpost = mysql_query("INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_status, comment_status, ping_status, post_name, post_parent, menu_order, post_type) VALUES ('1', '$array_dle[date]', '$array_dle[date]', '$array_dle[short_story]', '$array_dle[title]', 'publish', 'open', 'open', '$array_dle[alt_name]', '0', '0', 'post')"); echo $array_dle[title]; echo " - Статья добавлена";