Solved

I'd like to read out MS SQL using PHP

Posted on 2012-04-05
5
306 Views
Last Modified: 2012-04-20
We have running MSSQL 2008 (server) running on our server. On this MSSQL server we have running our inventory system on MSSQL. We'd like to make this reachable for clients so they can see our inventory real time. We tried to start with mssql_connect command from the web server but it says this function is not available. What do we need to get this done?
0
Comment
Question by:Theun111
  • 3
5 Comments
 
LVL 8

Expert Comment

by:ee_reach
ID: 37810265
0
 
LVL 8

Expert Comment

by:ee_reach
ID: 37810292
I see you've edited your question since I sent in my response.

To address the specific question you have now raised, I think you should double-check that you have the mssql extension enabled in php. For that, have a look here:
http://www.phpfreaks.com/forums/index.php?topic=325480.0
0
 
LVL 8

Expert Comment

by:ee_reach
ID: 37810321
By the way, what you may need to do may depend on your version of php.  Have a look here:
http://www.php.net/manual/en/intro.mssql.php
0
 
LVL 9

Accepted Solution

by:
rinfo earned 500 total points
ID: 37815708
MSSql database names are denoted by MachineName/databaseserver name combination.
To access mssql you have to define host in this format.
To achieve this use define
$config['Database']['server'] = 'HOST\SQLEXPRESS';
$dbhandle = mssql_connect($config['Database']['server'] , $myUser, $myPass) or die()
$selected = mssql_select_db($myDB, $dbhandle)
0
 

Author Closing Comment

by:Theun111
ID: 37869427
No.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Possible fixes for Windows 7 and Windows Server 2008 updating problem. Solutions mentioned are from Microsoft themselves. I started a case with them from our Microsoft Silver Partner option to open a case and get direct support from Microsoft. If s…
A safe way to clean winsxs folder from your windows server 2008 R2 editions
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
This tutorial will show how to configure a single USB drive with a separate folder for each day of the week. This will allow each of the backups to be kept separate preventing the previous day’s backup from being overwritten. The USB drive must be s…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question