search
Homephp教程php手册php 把mssql数据导入转换mysql数据库

php 把mssql数据导入转换mysql数据库

Jun 13, 2016 am 10:07 AM
mssqlmysqlphpimportBundledatadatabaseConvert

php 把mssql数据导入转换mysql数据库 首页得了解一下,我们是怎么把mssql server的数据导入到mysql数据库的,首先要在你的机器上装上mssql server 2000,同时还要让你的机器支持php+apache+mysql或是php+iis+mysql,好了,有一这些我们就可以开始导入数据了。

php教程 把mssql数据导入转换mysql教程数据库教程
首页得了解一下,我们是怎么把mssql server的数据导入到mysql数据库的,首先要在你的机器上装上mssql server 2000,同时还要让你的机器支持php+apache+mysql或是php+iis+mysql,好了,有一这些我们就可以开始导入数据了。
*/
//mssql server与php连接

$mcn = mssql_connect('127.0.0.1','sa','1');
mssql_select_db('hb',$mcn);

//mysql数据库连接

$conn = mysql_connect('localhost','root','a') or die('mysql server 连接失败');
mysql_select_db('sa',$conn);
$mssql = "select * from bc ";
$msquery = mssql_query( $mssql ); //查询mssql server 的数据保存到数据
if( mssql_num_rows( $msquery ) )
{
 while( $rs = mssql_fetch_array( $msquery ) )
 {
  $mysql ="insert into vv(id,title) values('$rs[id]','$rs[title]')"; //mysql查询语句
  mysql_query($mysql);//把mssql server 的数据保存数据到mysql数据库
 }
}


else
{
 echo 'mssql server 没有数据';
}
/*
ok总算了完成了,其实方法很简单就是同时连接二个数据库,然后把mssql  的数据读取出来保存到数据,再一条条保存到mysql数据库了。
本站原创文章注明来源www.bKjia.c0m/phper/php.html
*/

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment