PHP
  Home arrow PHP arrow Executing SQL Server Stored Procedures Wit...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
PHP

Executing SQL Server Stored Procedures With PHP
By: Joe O'Donnell
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 64
    2003-01-01

    Table of Contents:
  • Executing SQL Server Stored Procedures With PHP
  • Configuring PHP
  • Running the mssql_xxx functions
  • Executing stored procedures
  • Capturing output parameters and return values
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Executing SQL Server Stored Procedures With PHP


    (Page 1 of 6 )

    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.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.

    More PHP Articles
    More By Joe O'Donnell


       · Thanks for the awesome article. I needed to brush through the introduction for some...
       · i can't connect to my server.. nothing displays.. i don't have user and password in...
     

    PHP ARTICLES

    - 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
    - PHP Frontend to ImageMagick
    - Using PEAR's mimeDecode Module
    - Incoming Mail and PHP







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 5 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek