mysql数据复制到access数据库

减小字体 增大字体 作者:佚名  来源:本站整理  发布时间:2009-03-16 13:37:45
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);
?>  

Tags:

作者:佚名
分享到: 微信 更多