mysql数据复制到access数据库

  • 来源: 互联网 作者: rocket   2008-03-19/09:30
  • 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","PASS
    WORD");  
            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);
    ?>  





    评论 {{userinfo.comments}}

    {{money}}

    {{question.question}}

    A {{question.A}}
    B {{question.B}}
    C {{question.C}}
    D {{question.D}}
    提交

    驱动号 更多