Ask your WordPress questions! Pay money and get answers fast! (more info)

How do I pull data from a Microsoft SQL Server?

  • CLOSED

I have a WP site with a custom post type. My client wants me to include data from an external database running on MS SQL Server. I was given Windows Authentication access to the server and database by our IT dept, but I do not have any login info.

I'm confused about how to connect and how to access the data I want when I do. Does anyone have experience with this sort of thing?

Answers (4)

2016-10-31

Rempty answers:

Hello

Here is how connect to MSSQL server using Windows Authetication access
http://php.net/manual/en/function.sqlsrv-connect.php

The same as before but from Microsoft MSDN
https://msdn.microsoft.com/en-us/library/cc296205(v=sql.105).aspx

Sorry but never tried this before, but maybe the links above can help you.

Cheers

2016-10-31

Bob answers:

the external database is used for wordpress or that external database has information that you need to add in wordpress?


initiatus comments:

Agree, this is important to know.

2016-10-31

initiatus answers:

Do you know if any other website uses that database? If so you could check that site's config files to find out how it connects to the DB.

2016-10-31

Arnav Joy answers:

is your problem solved ?