MSSQL/PHP

Status
Not open for further replies.

DomainRealty

I'm a Coder
Mar 14, 2007
612
2
0
www.jrbcomputerservices.com
Alright. I know how to use PHP/MySQL. However, I have a client who runs everything off a MSSQL (Microsoft SQL) server. I have access to a Linux server on which I can run PHP...how the hell do I connect to MSSQL from PHP?

I've heard that I need some shell-level software "FreeTDS"--true?

Jason
 


PHP is PHP is PHP is PHP. By that I mean PHP will always be PHP regardless of what SQL your using. The cool part about this is that the only thing you gotta worry about the database connect functions. And, as kyleirwin noted, you just use mssql_connect for that stuff.
 
Josh:


I know that it's still PHP; the question was if/how the _connect(), _query(), _fetch_assoc(), etc. functions change.

Thanks for the answer(s?). The problem I have now is basically that mssql_connect() isn't defined--I read that this has to do with FreeTDS/the MSSQL connection driver on the Linux machine.

Jason
 
Get ADOdb and use it. Much easier possibly.

Or grab the PEAR DB classes and I think it has abstraction in it for MSSQL.

And using mssql_???? & mysql_???? are basically the exact same functions, different parameters on some, but you still HAVE to CONNECT to the database BEFORE you USE it...
 
Status
Not open for further replies.