?
Solved

I'd like to read out MS SQL using PHP

Posted on 2012-04-05
5
Medium Priority
?
312 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 1500 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

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

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

Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
Viewers will learn how the fundamental information of how to create a table.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

850 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