My SQL数据复制到access数据库
时间:2007-12-23 来源:不详 作者:迈克DB
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
文章评论
共有位Admini5网友发表了评论 查看完整内容