Jump to content


Photo

PHP and MSSQL


  • Please log in to reply
1 reply to this topic

#1 SharkBait

SharkBait
  • Members
  • PipPipPip
  • Advanced Member
  • 845 posts
  • LocationMetro Vancouver, BC

Posted 02 May 2006 - 08:53 PM

Hi,

Is it somewhat as easy as it is with MySQL to get PHP to Connect to MSSQL on a machine running Win2003 Ent. ?

I figured I would have to do it via the ODBC but I've not had to use the ODBC with PHP and I assume there is a setting in the php.ini file I have to change inorder to do this?

If the server that I have running PHP accesses MySQL DBs as well, will setting it up to connect to MSSQL bugger it up? I don't like MS products much but one of our workplace applications runs SAP which is windows based and I want to use PHP to talk to the SAP database.

I noticed that the tutorial here on PHPFreaks uses the ODBC to connect to a MS Access DB but it only shows the configuration of ODBC on a winbox.

:)

#2 Barand

Barand
  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 03 May 2006 - 07:05 AM

Use php mssql functions.

[a href=\"http://www.php.net/manual/en/ref.mssql.php\" target=\"_blank\"]http://www.php.net/manual/en/ref.mssql.php[/a]

For most of them, simply change myxxx to msxxxx

eg. mysql_connect() becomes mssql_connect();
If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received






moon.png

|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users