Solved

Get data from MS SQL and insert in MySQL database

Posted on 2013-05-29
3
359 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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

752 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