Solved

Get data from MS SQL and insert in MySQL database

Posted on 2013-05-29
3
360 Views
Last Modified: 2013-06-14
Hi,
I have a php page from where I need to query a MS SQL database and insert the results into a MySQL database in tmp tables.
I need to create two separate db connections, one for MS SQL and one for MySQL, however not sure how to proceed further with this.
Can some one point me in the right direction how to proceed further on this.

Thanks,
Mohit
0
Comment
Question by:Mohit_t
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Assisted Solution

by:Om Prakash
Om Prakash earned 250 total points
ID: 39206847
0
 
LVL 110

Accepted Solution

by:
Ray Paseur earned 250 total points
ID: 39207261
These functions might be what you want.  I say "might" because we do not have enough information to answer the question.  The version of PHP matters.  Also, we would need to know whether this is a one-time exercise or if it is something that is going to be repeated in the future.  Both of these DB extensions are potentially short-lived.
http://php.net/manual/en/function.mssql-connect.php
http://php.net/manual/en/function.mysql-connect.php

Going forward, you may find that this is what you need.  
http://php.net/manual/en/function.sqlsrv-connect.php
http://php.net/manual/en/mysqli.construct.php

More information on the removal of MySQL from PHP is available in this article.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/PHP_Databases/A_11177-PHP-MySQL-Deprecated-as-of-PHP-5-5-0.html
0
 
LVL 110

Expert Comment

by:Ray Paseur
ID: 39246888
Please see the EE grading guidelines.  The "default" grade is A.  You did not offer the follow-on information that was needed.
http://www.experts-exchange.com/help/viewHelpPage.jsp?helpPageID=26

What was so wrong with the answers that you chose to give a marked down grade?  I think we need to hear your explanation. Thanks, ~Ray
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this series, we will discuss common questions received as a database Solutions Engineer at Percona. In this role, we speak with a wide array of MySQL and MongoDB users responsible for both extremely large and complex environments to smaller singl…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question