Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PHP with MS SQL Server

Status
Not open for further replies.

storm197

MIS
Oct 9, 2002
55
CA
Hi,

I'm starting a new project for a company.
They want me to program an application using PHP and MS SQL 7. Is it recommended to use PHP ans MS SQL?

Is it worth to spend energy to convince them to install MySQL instead ?Do you have any argument that could help me?

Thank you
 
If you have MSSQL expertise and a server already available, I see no reason to not use it with your PHP code. PHP provides native-library communication functions to MSSQL on both Win32 and Unix-like OSes.




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Yeah, but most of the script or pre-made code that I've found on the net and in books are built for MySQL. Will I have to change all the syntax if I use MS SQL ?
 
the syntax is different. I think you need to know what the app is to do e.g. do you need transactions, stored procedure, sub selects,roll back/rollforward recovery etc etc
 
Well, the system will be an IT assets management system and will work with a Login/Password authentification system with stored variable (various groups with various rights).

I'm at the beginning of designing it.

 
You need to understand the functionl requirments e.g. will a function need to update 4 tables to remain consistent?. You cant gaureeentee that with standard mysql as it doesn't support transactions (some later version do I belive).
It's not an easy question, mssql will cost money but I woulod not use mysql for mission critical stuff. In an asseset managment system you may loose things !
 
storm197:
The difference between using PHP with MySQL or PHP with MSSQL boils down to more differences in vocabulary, not syntax.

With either server, under most circumstances you will in a script perform the following actions:[ul][li]Connect to the server (mysql_connect() versus mssql_connect())[/li][li]Optionally select a database (mysql_select_db() versus mssql_select_db())[/li][li]Pass the database server a query (mysql_query() versus mssql_query())[/li][li]Optionally process the return of the query (mysql_fetch_assoc() versus mssql_fetch_assoc())[/li][/ul]

The thing that will be the most different is the queries you pass to the database server because of differences in the SQL implementations of the two database systems.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
At a techie level all the above is true, but as i posted you have to understand if the db will support what you want it to do
 
storm197:

ingresman has a point -- if the money is not an issue, choose the system that will best serve your needs.

Where I disagree with ingresman is in not using MySQL for mission-critical applications. Running MySQL on Linux, I've never had data corruption problems. I have had some versions of MySQL that would corrupt its indeces, but never a problem with its losing data.


Want the best answers? Ask the best questions!

TANSTAAFL!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top