Jump to content

How well does PHP work with MS SQL databases and where can I find info?


simcoweb

Recommended Posts

I have a client that insists we use their MS SQL database for some programming we're doing. Since i've only worked with MySQL and PHP I don't have any reference, disastrous pitfalls to avoid, hardships to be aware of, etc. in doing so. Looking for a bit of guidance here and any experiences. Thanks!

Link to comment
Share on other sites

I used MSSQL and PHP in a project related to a game I play...  It had some pretty intense queries lol...  One query spanned 11 tables on 4 databases all comparing the same key lol...

 

Anyways the only difference I have found so far, is that the server of mssql that I used did not use LIMIT... Newer versions of MSSQL might.  I'm not sure.

 

Most the functions are just mssql_mysqlfunction, such as mssql_connect, mssql_select_db, mssql_query, mssql_fetch_[assoc|array], mssql_num_rows etc...

 

I know I didn't really answer much, but I guess basically from the PHP side, MySQL and MSSQL seem VERY similar to me with only a few minor differences.

 

Note:  A work around to the limit thing is TOP

If you wanted to select the top 10 users with the most online time you would do something like

SELECT TOP 10 FROM users ORDER BY online_time...

 

The only problem is limits starting from a certain entry, but of course that can be solved too depending on the table....

 

Anyways, I'm done rambling now.

 

PS Someone please tell me if the newer versions of mssql have LIMIT

Link to comment
Share on other sites

corbin, ok...so many of the terms are similar but just preceded with mssql. This shouldn't be too hard to 'adapt' to using this... I hope! I went to the PHP manual page and researched it also. The queries will be pretty straightforward stuff. Basically it's a shopping cart that using points as a currency instead of money. Problem is ALL the class files in this cart are written for MySQL queries. What i'm hoping is that I will be able to simply go through them and convert them to MSSQL queries since the requests are similar. Maybe i'm dreaming here?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.