Login   Register  
PHP Classes
elePHPant
Icontem

MySQL SP: Emulation of MySQL stored procedures

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Info   View files View files (4)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings  
2005-08-12 (9 years ago) RSS 2.0 feedStarStarStar 59%Total: 2,448 All time: 1,471 This week: 1,387Up
Version License Categories  
mysql_sp 1.0BSD LicenseDatabases, Templates
Description Author  

This class is meant to provide an emulation of stored procedures for MySQL.

It uses template files stored on the database client side that contain multiple SQL statements with special marks that identify placeholders that are replaced by procedure arguments when they are executed.

The result of the execution of procedure is an array containing either the handles of the result set of the SELECT statements or the number of affected rows of other statements.

Innovation Award  
PHP Programming Innovation award nominee
April 2004
Number 5


Prize: One downloadable copy of Komodo
Despite the MySQL popularity among PHP developers, it always had several limitations when compared to high end commercial databases. One of such limitations is the lack of support for stored procedures that could be used to encapsulate several SQL statements in a single function that just takes a few arguments to execute.

This class provides a MySQL client side solution that implements a stored procedure language using files to store the procedure SQL statments.

Despite the support for MySQL server side based stored procedurex is planned for one of the upcoming releases of MySQL, the solution provided by this class provides right now part of the benefits of using stored procedures in MySQL based PHP applications.

Manuel Lemos
Picture of Alexandar Minkovsky
Name: Alexandar Minkovsky <contact>
Classes: 3 packages by
Country: Bulgaria Bulgaria
Age: 44
All time rank: 1491 in Bulgaria Bulgaria
Week rank: 1555 Down10 in Bulgaria Bulgaria Down
Innovation award
Innovation award
Nominee: 2x

  Files folder image Files  
File Role Description
Accessible without login Plain text file createAccount.sql Data sample stored procedure
Accessible without login Plain text file example.php Example Example class usage
Accessible without login Plain text file junk_db_create.sql Data Creates the example database (executed by example.php)
Plain text file mysql_sp.class.php Class The class file

 Version Control Unique User Downloads Download Rankings  
 0%Total:2,448All time:1,471
 This week:0This week:1,387Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:-
Examples:91%StarStarStarStarStar
Tests:-
Videos:-
Overall:59%StarStarStar
Rank:968