首页  >  文章  >  后端开发  >  mysql数据复制到access数据库_PHP教程

mysql数据复制到access数据库_PHP教程

WBOY
WBOY原创
2016-07-13 17:00:49899浏览

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);
?>
【本文版权归作者与奥索网共同拥有,如需转载,请注明作者及出处】


www.bkjia.comtruehttp://www.bkjia.com/PHPjc/631211.htmlTechArticlemysql数据库表sqltable 字段id,name,sex,email access数据库表accesstable id,name,sex,email ? $connect = mysql_connect(localhost,,); mysql_select_db(mydatabase); $...
声明:
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn