Avatar

How to import old MLF database to MLF2? - PART 2 (Technics)

by Micha ⌂, Wednesday, July 18, 2007, 20:43 (6098 days ago) @ Micha

Part 2

 
 echo "<hr/>n<p>&Uuml;bertrage ".$mlf17_forumdlk_entries." nach ".$mlf20_forumdlk_entries."</p>n";
 $sql = "SELECT * FROM `".$mlf17_forumdlk_entries."`";
 $result = mysql_query($sql) OR die(mysql_error());
 if (mysql_num_rows($result)){
  while($row = mysql_fetch_array( $result, MYSQL_ASSOC )){
   $insert_data = "INSERT INTO `".$mlf20_forumdlk_entries."` 
     (`id`, `pid`, `tid`, `uniqid`,`time`, `last_reply`, `edited`, `edited_by`, `user_id`, `name`, `subject`, `category`, `email`, `hp`, `location`, `ip`, `text`, `show_signature`, `email_notification`, `marked`, `locked`, `sticky`, `views`) VALUES 
     ('".$row['id']."', '".$row['pid']."', '".$row['tid']."' , '".$row['uniqid']."', '".$row['time']."', '".$row['last_answer']."', '".$row['edited']."', '".$row['edited_by']."', '".$row['user_id']."', '".$row['name']."', '".$row['subject']."', '".$row['category']."', '".$row['email']."', '".$row['hp']."', '".$row['place']."', '".$row['ip']."', '".$row['text']."', '".$row['show_signature']."', '".$row['email_notify']."', '".$row['marked']."', '".$row['locked']."', '".$row['fixed']."', '".$row['views']."')";
   $insert = mysql_query($insert_data);
  }
 }
 
 echo "<hr/>n<p>&Uuml;bertrage ".$mlf17_forumdlk_userdata." nach ".$mlf20_forumdlk_userdata."</p>n";
 $sql = "SELECT * FROM `".$mlf17_forumdlk_userdata."`";
 $result = mysql_query($sql) OR die(mysql_error());
 if (mysql_num_rows($result)){
  while($row = mysql_fetch_array( $result, MYSQL_ASSOC )){
   $insert_data = "INSERT INTO `".$mlf20_forumdlk_userdata."` 
     (`user_id`,`user_type`, `user_name`,`user_real_name`,`user_pw`,`user_email`, `email_contact`,`user_hp`, `user_location`, `signature`,`profile`, `logins`, `last_login`,`last_logout`,`user_ip`,`registered`, `user_view`,`new_posting_notification`,`new_user_notification`,`time_difference`, `user_lock`, `pwf_code`, `activate_code`) VALUES 
     ('".$row['user_id']."', '".$row['user_type']."', '".$row['user_name']."', '".$row['user_real_name']."', '".$row['user_pw']."', '".$row['user_email']."', '".$row['hide_email']."', '".$row['user_hp']."', '".$row['user_place']."', '".$row['signature']."', '".$row['profile']."', '".$row['logins']."', '".$row['last_login']."', '".$row['last_logout']."', '".$row['user_ip']."', '".$row['registered']."', '".$row['user_view']."', '".$row['new_posting_notify']."', '".$row['new_user_notify']."', '".$row['time_difference']."', '".$row['user_lock']."', '".$row['pwf_code']."', '".$row['activate_code']."')";
   $insert = mysql_query($insert_data);
  }
 }
 
?>
</body>
</html>
 

Micha

--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences

locked
4932 views

Complete thread:

 RSS Feed of thread