Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 364
  • Last Modified:

Get data from MS SQL and insert in MySQL database

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
Mohit_t
Asked:
Mohit_t
  • 2
2 Solutions
 
Ray PaseurCommented:
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
 
Ray PaseurCommented:
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now