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);
?>