Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2004-04-16 05:57
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>");
?>