mysql數據庫表sqltable
字段id,name,sex,email
access數據庫表accesstable
id,name,sex,email
<?
$connect = mysql_connect("localhost","","");
mysql_select_db("mydatabase");
$sql = "select * from sqltable;
$result = mysql_query($sql};
$connectodbc=odbc_connect("DSN","USERNAME","PASSWORD");
while($row = mysql_fetch_row($result))
{
$sql="insert into accesstable
values($row["id",$row["name",$row["sex"],$row["email"])";
odbc_do($connectodbc,$sql);
}
odbc_close($connectodbc);
mysql_close($conect);
?>
上文中就將mysql數據導入access數據庫做了介紹,上文中的代碼就能夠幫助大家實現數據的導入。