PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Alexandar Minkovsky  >  MySQL SP  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example class usage
Class: MySQL SP
Emulation of MySQL stored procedures
Author: By
Last change:
Date: 17 years ago
Size: 690 bytes
 

Contents

Class file image Download
<?
error_reporting
(E_ALL);
require(
"mysql_sp.class.php");

//Recreate the junk database
$sp = new mysql_sp("127.0.0.1","3306","root","","junk_db_create.sql");
$res = $sp->execute();

//execute the createAccount stored procedure
$sp->sp_file = "createAccount.sql";
$sp->sp_params = array (
                       
"UserName" => "Trial user",
                       
"UserPassword" => "XXX",
                       
"FirstName" => "FNM",
                       
"LastName" => "LNM"
                       
);
$res = $sp->execute();
print(
"<hr>");
print(
"createAccount done with result: ");
print_r($sp->results[count($sp->results)-1]);
print(
"<hr>");
?>

For more information send a message to info at phpclasses dot org.