Solved

I'd like to read out MS SQL using PHP

Posted on 2012-04-05
5
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Suggested Solutions

OfficeMate Freezes on login or does not load after login credentials are input.
This article explains how to install and use the NTBackup utility that comes with Windows Server.
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

726 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