Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

DevArticles:
MSSQL and Stored Procedures Magic
Jan 02, 2003 @ 13:26:28

When you're making the crossover of PHP and the MSSQL 2000 database, there's some neat little functions you can get the SQL server to run, and use PHP to capture the results of. These functions, called "stored procedures", can be amazingly useful for your application, and can cut your PHP code in half by defining a more advanced result set on the SQL server side of things. So, how do you use these great functions with PHP? Well, DevArticles' new piece just might help you out....

In their latest article, Executing SQL Server Stored Procedures With PHP, they show you how to configure PHP to use MSSQL, and how to create a simple stored procedure on your server to return a more advanced result set than just a normal select can give you. Using some simple commands (like "USE", "GO", and "EXEC"), you can use these stored procedures simply and easily in PHP, and return results easily using the normal mssql_* functions already built in. The real key is the mssql_bind function, that grabs these specially named results and drops them into variables you can use.

tagged:

Link:


Trending Topics: