simcoweb Posted February 16, 2007 Share Posted February 16, 2007 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! Quote Link to comment Share on other sites More sharing options...
Greaser9780 Posted February 16, 2007 Share Posted February 16, 2007 Try posting this down in the mssql forum as well. I am sure they will be able to give you plenty of insight on what to look out for and how they differ. Quote Link to comment Share on other sites More sharing options...
daq Posted February 16, 2007 Share Posted February 16, 2007 There are wrappers from DB communication -- it doesn't even matter then whether you are reading data from CSV file or MySQL. Quote Link to comment Share on other sites More sharing options...
corbin Posted February 16, 2007 Share Posted February 16, 2007 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 Quote Link to comment Share on other sites More sharing options...
simcoweb Posted February 16, 2007 Author Share Posted February 16, 2007 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? Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 16, 2007 Share Posted February 16, 2007 simco: You should use the ADODB library to handle your db connection, and yeah, most of the queries will be the same except for selects as corbin pointed out don't use limit. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.