Home arrow PHP arrow Executing SQL Server Stored Procedures With PHP
PHP

Executing SQL Server Stored Procedures With PHP


In this article Joe looks at how to connect to an SQL Server 2000 database using PHP's set of mssql_xxx functions, and also how to execute commands and stored procedures against that database.

Author Info:
By: Joe O'Donnell
Rating: 5 stars5 stars5 stars5 stars5 stars / 93
January 01, 2003
TABLE OF CONTENTS:
  1. · Executing SQL Server Stored Procedures With PHP
  2. · Configuring PHP
  3. · Running the mssql_xxx functions
  4. · Executing stored procedures
  5. · Capturing output parameters and return values
  6. · Conclusion

print this article
SEARCH DEVARTICLES

Executing SQL Server Stored Procedures With PHP
(Page 1 of 6 )

http://www.microsoft.com/sql/downloads/default.aspIn my time as a web developer and database administrator, I've come to love the combination of PHP and Microsoft SQL Server to deliver dynamic content to my clients. I know that MySQL is the most popular database to use with PHP, but PHP includes support for many other databases, and I just happen to love the power and flexibility of SQL Server 2000.

Just like ASP and ASP.NET, PHP can also connect to an SQL Server database and execute queries and stored procedures. If you're not familiar with SQL Server, then you'd be unfamiliar with stored procedures. Basically, a stored procedure is a bunch of SQL queries grouped together that can be called kind-of like a function with input and output parameters. Stored procedures can return complete recordsets, just values, or both recordsets and values.

In this article we're going to look at how to equip your installation of PHP with SQL Server support, how to connect to an SQL Server 2000 database using PHP's set of mssql_xxx functions and also how to execute commands and stored procedures against that database, capturing the output parameters and recordsets returned from those stored procedures.

To get the most benefit from this article, you should be running PHP on a Windows server as well as SQL Server 2000 on either the same or a different PC. I will assume that the PC running SQL Server 2000 is the same one that you have installed PHP onto.

If you don't have a copy of SQL Server 2000, then you can download a free 120-day trial version here.

blog comments powered by Disqus
PHP ARTICLES

- Removing Singletons in PHP
- Singletons in PHP
- Implement Facebook Javascript SDK with PHP
- Making Usage Statistics in PHP
- Installing PHP under Windows: Further Config...
- File Version Management in PHP
- Statistical View of Data in a Clustered Bar ...
- Creating a Multi-File Upload Script in PHP
- Executing Microsoft SQL Server Stored Proced...
- Code 10x More Efficiently Using Data Access ...
- A Few Tips for Speeding Up PHP Code
- The Modular Web Page
- Quick E-Commerce with PHP and PayPal
- Regression Testing With JMeter
- Building an Iterator with PHP

Watch our Tech Videos 
Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 

Developer Shed Affiliates

 




© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials