I don't seem to be having much luck with this. Now I get the following error:
Database error in vBulletin 2.2.1:
Invalid SQL: INSERT INTO user (username, password, email, birthday,usergroupid) VALUES ('mike','efe6398127928f1b2e9ef3207fb82663','mike@n o.com', 1976-02-29), '2'
mysql error:
mysql error number: 0
Date: Wednesday 23rd of January 2002 12:42:40 PM
Script:
http://www.studentpilot.com/interact...forum/file.php
Referer:
Just to double check, this is exactly what the file looks like:
PHP Code:
<?
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,usergroupid) VALUES ('".addslashes(htmlspecialchars($users[username]))."','".addslashes(md5($users[password]))."','".addslashes(htmlspecialchars($users[email_address]))."', $users[dob]), '2'");
$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>";
}
?>