Quote:
Originally posted by nsglazer
By the way -- there are currently 25 subscribed members in the new vbulletin forum. Would this impact the migration in any way?
|
It shouldn't affect the migration, as each new user is assigned a new and unique userid.
Looking at your code, I think it should be changed to this (not tested):
PHP Code:
<?php
require("./global.php");
if(empty($start)) {
$start = 0;
}
$query = $DB_site->query("SELECT username, password, email_address, dob FROM studentpilot.users LIMIT $start, 100");
while($users = $DB_site->fetch_array($query)) {
$finished = 1;
$DB_site->query("INSERT INTO user (username, password, email, birthday) VALUES ('".addslashes(htmlspecialchars($users[username]))."','".addslashes(md5($users[password]))."','".addslashes(htmlspecialchars($users[email_address]))."', $users[dob])");
$userid = $DB_site->insert_id();
$DB_site->query("INSERT INTO userfield VALUES ($userid)");
}
if($finished) {
echo "<p><script language=\"javascript\">window.location=\"$PHP_SELF?start=".($start+100)."#end\";</script><a name=\"end\"></a><a href=\"$PHP_SELF?start=".($start+100)."#end\"><b>Continue with next</b></a></p>\n";
}
else {
echo "<p>Import complete</p>";
}
?>
I guess someone was a bit to fast on the trigger while trying to get ahead of Chen to the solution
EDIT: But then again, a certain someone fixed his bugs faster than me