PHP Classes

SQL Proc Func: Run stored procedures and queries read from files

Recommend this page to a friend!
  Info   Demos   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 385 All time: 6,701 This week: 455Up
Version License PHP version Categories
sql-proc-func 0.0.1MIT/X Consortium ...5.3HTML, PHP 5, Databases
Description 

Author

This class can run stored procedures and queries read from files.

It can read SQL statements for executing stored procedures from files.

The queries are executed as prepared statements taking given arguments.

The class may also read all SQL statement files and display them in an HTML table.

Picture of Andras Toth
  Performance   Level  
Name: Andras Toth <contact>
Classes: 3 packages by
Country: Hungary Hungary

Details

SqlFuncProc =========== Useful tool for a fast development, when working more developers in one project.<br> Demo: <a href="http://atandrastoth.co.uk/main/pages/phpclasses/SqlFuncProc/">Live Demo</a><br> <img src="demo.PNG"><br> usage:<br> -create sql script with your favorite application<br> -replace the parameters of the ?<br> -save sql script to predefined folder<br> <pre> require_once('SqlFuncProc.php'); // get instance with PDO connection data //$func = SqlFuncProc::getInstance("mysql:host=YOURSERVER;dbname=AdventureWorks2012;charset=utf8", yourname, yourpass); $func = SqlFuncProc::getInstance("sqlsrv:Server=YOURSERVER;Database=AdventureWorks2012", null, null); // Functions list from folder with parameters : viewFunc($name = "", $class="") // $name: chars from filename, $class: table class echo $func->viewFunc("", "table table-bordered"); // Processes list from folder with parameters : viewFunc($name = "", $class="") // $name: chars from filename, $class: table class echo $func->viewProc("", "table table-bordered"); //Run noerror proc runProc($proc, $params = array(), $force = false); //$proc: process name, $params: parameter array $data = $func->runProc('noerror', array(50)); print_r($data); //Run OrganizationTree func: runFunc($proc, $params = array(), $limit = false) //$proc: process name, $params: parameter array, $limit : returned rows count //return array() $data = $func->runFunc("OrganizationTree",array(1,0), 10); //Create HTML table from array: getHTMLtable($array = array(), $id = "", $class = "", $head = true) echo $func->getHTMLtable($data, "", "table table-striped", true); </pre> Add more feature in the nearest future... Author: Tóth András

  demoExternal page  
Screenshots (3)  
  • demo1
  • demo2
  • demo3
  Files folder image Files (10)  
File Role Description
Files folder imageSqlFunc (1 file)
Files folder imageSqlProc (2 files)
Accessible without login Image file demo.PNG Data Auxiliary data
Accessible without login Plain text file index.php Example Example script
Accessible without login Plain text file README.md Data Auxiliary data
Plain text file SqlFuncProc.php Class Class source

  Files folder image Files (10)  /  SqlFunc  
File Role Description
  Accessible without login Plain text file OrganizationTree.sql Data Auxiliary data

  Files folder image Files (10)  /  SqlProc  
File Role Description
  Accessible without login Plain text file error.sql Data Auxiliary data
  Accessible without login Plain text file noerror.sql Data Auxiliary data

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 70%
Total:385
This week:0
All time:6,701
This week:455Up