I'm trying to do something that seems on the outside like it would be simple. I need to archive some posts off of my main database and onto another one to try and speed things up for my forums. All I really need for it to do is to copy old posts onto another database. I can delete them manually once they are copied over. I don't have much experience writing php code. I do have some in VB and Lotus script. I have this so far: [] <?php require_once('Connections/db6.php');
mysql_select_db($database_db6, $db6);
$query_Recordset3 = "SELECT * FROM w3t_Posts WHERE B_Number = [$i]";
$Recordset3 = mysql_query($query_Recordset3, $db6) or die(mysql_error());
$row_Recordset3 = mysql_fetch_assoc($Recordset3);
$totalRows_Recordset3 = mysql_num_rows($Recordset3);
require_once('Connections/db1.php');
mysql_select_db($database_db1, $db1);
$query_insert = "
INSERT INTO w3t_Posts (B_Board,B_Parent,B_Main,B_Posted,B_Last_Post,B_IP,B_Subject,B_Body,B_Kept,B_Status,B_Approved,B_Icon,B_Reged,B_Poll,B_Replies,B_Topic,B_Convert,B_PosterId,B_AnonName,B_Sticky,B_ParentUser)
VALUES ('$Board_q','$Parent','$Main','$date','$date','$IP_q','$Subject_q','$BodySig','$Kept_q','$PStatus_q','$Approved_q','$Icon_q','$Reged_q','$PollName','0','$Topic','$convert_q','$posterid','$AnonName_q','0','$ParentUser')
";
$insert = mysql_query($query_insert, $db1) or die(mysql_error());
?> [/]
I've pirated some of this.

Anyway, my main plan is to step through this using a do while loop and incrementing variable $i. Can I just set the variable $Board_q = B_Board etc.? I don't have any idea how arrays really work in php. Can I just load all of the posts I need into an array and move them at once instead of stepping through one record at a time? There are about 150,000 posts I need to move. Thanks for any help. I have some PHP books on the way but I would like to go ahead and get this working.
