Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
examples
src/DB
.gitignore
API-0.1.0
CREDITS
README
RELEASE-0.1.0
extrasetup.php
package.xml
package_compatible.xml
packagexmlsetup.php

README

Library for accessing stored procedures as PHP Method

This package make stored procedures from PostgreSQL and others SGDB
can used as PHP Methods.
You have PDOStatement as answer like in this sample:
  
  -- in database dev
  create or replace function teste() returns varchar(10) as
	$$
	begin
	return 'teste';
	end;
	$$
	language 'plpgsql';

$a =  new PDO("pgsql:host=localhost;port=5432;dbname=dev;user=postgres;password=root");
$pl2method = \PEAR2\DB\Pl2Method\Pl2Method::getInstance($a);

here you have a PDOStatement
$returned = $pl2method->public->teste();
var_dump( $returned );
 and You can FetchAll()
var_dump($returned->FetchAll());
Something went wrong with that request. Please try again.