Solved

I'd like to read out MS SQL using PHP

Posted on 2012-04-05
5
299 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
Comment Utility
0
 
LVL 8

Expert Comment

by:ee_reach
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
No.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
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...
This tutorial will walk an individual through the steps necessary to join and promote the first Windows Server 2012 domain controller into an Active Directory environment running on Windows Server 2008. Determine the location of the FSMO roles by lo…
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.

762 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now