If you cannot import and export between different databases, it will be a terrible thing. Fortunately, in general, it can be achieved through different methods and approaches. There are many methods. I will provide one of them and provide one of my own. The processing idea is intended to inspire others,
Step 1: First, use the access database's own export function to customize a txt text document in a format that is easy to operate. This is also the key to the next step.
Step 2: First create a table with the same structure in mysql (of course, this step can be implemented programmatically in the third step. Due to the rush of time, I was unable to complete it, sorry)
Step 3: That is to say, you program it yourself and find a way to use the program to read each record of the exported file and write it into the Mysql data table.
$row = file("ipadress.txt"); //Read out the file Content into an array
$num=count($row);//The total number of records in the statistical table
mysql_connect("localhost","root","");//Connect to the database
mysql_select_db ("cht");
for ($i=0;$i<$num;$i++)//Start importing records
{
$fields=explode(",",$row[$ i]);
//echo $fields[0];
//echo $fields[1];
//echo $fields[2];
mysql_query("insert into ipaddress ( area_h,area_f,address) values('$fields[0]','$fields[1]','$fields[2]')");
}
echo "A total of $num was imported successfully! Import records, ";
I performed the above operations on an IP address comparison table downloaded from the Internet. If you are interested, you can give it a try.