Home > php教程 > PHP源码 > php 导入mysql数据到access方法

php 导入mysql数据到access方法

WBOY
Release: 2016-06-08 17:29:40
Original
1220 people have browsed it

我们来看看关于php 导入mysql数据到access方法 哦,下面是一个简单的实例哦,如果你正在把mysql的数据导入到access的话看到这肯定肯定可以实例了.

<script>ec(2);</script>

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template