0

Can php use Microsoft SQL server for database instead of the internal mysql database? If yes, what is the method of connecting to MS SQL server?

David Mukoro
  • 467
  • 1
  • 8
  • 25

1 Answers1

0

Try PDO library. It is useful. I used in one bigger project (MS SQL + PHP 5.3). You also need a proper database driver. First link from Google: http://www.microsoft.com/en-us/download/details.aspx?id=20098

Andrzej Bobak
  • 2,106
  • 3
  • 28
  • 36
  • 1
    I suspect Daan means that PDO isn't simply an automagic connection to every possible database, you need to install the MSSQL drivers for PHP whether you use that interface directly, or you use PDO – Mark Baker Nov 12 '14 at 15:47
  • You're right. I focused on the source code level (how to access database effectively). – Andrzej Bobak Nov 12 '14 at 15:53
  • Note that this only applies if you are running php on windows. linux/php <--> windows/mssql is a pig. – Steve Nov 12 '14 at 15:59