For php access data operations, I have an access data file db. mdb. now I want to convert his data into mysql data. How can I operate this db. mdb using php. I only need to read it, and then insert the read information into the mysql database I created. That person has done it. thank you !, $ Mdb = & quot; database name php operation access data
I have an access data file db. mdb. now I want to convert his data into mysql data. How can I operate this db. mdb using php. I only need to read it, and then insert the read information into the mysql database I created. Thank you for doing this!
$ Rs = odbc_exec ($ connid, "select * from table name ");
While ($ row = odbc_fetch_array ($ rs )){
// It can be directly used here, and it is not necessary to go to mysql
$ Row = array_map ('addslashes', $ row); // Escape Special characters
Mysql_query ("insert into table name values ('". join ("', '", $ row). "')"; // insert a mysql table
}
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.