Solved

I'd like to read out MS SQL using PHP

Posted on 2012-04-05
5
305 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

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

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

Suggested Solutions

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
A procedure for exporting installed hotfix details of remote computers using powershell
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

803 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