====== metaProcedures ======
~~NOTOC~~
== See Also ==
[[v5:reference:connection:preparesp]]
== Syntax ==
function metaProcedures(
optional string $namePattern=null,
optional string $catalog=null,
optional string $schemaPattern=null
)
===== Description =====
The function ''metaProcedures()'' returns a list of stored procedures in a database. Some databases do not support stored procedures. The format of the data returned is as follows:
-------------------------------------------
Array(
[name_of_procedure] => Array(
[type] => PROCEDURE or FUNCTION or METHOD
[catalog] => Catalog (or owner) name
[schema] => Schema name
[remarks] => explanatory comment on the procedure
)
)
===== Parameters =====
==== $namePattern ====
An optional wildcard pattern match on the name of the procedure.
==== $catalog ====
An optional wildcard pattern match on the catalog (or owner) of the procedure.
==== $schemaPattern ====
An optional wildcard pattern match on the schema of the procedure.
===== Usage =====
$mp = $db->metaProcedures('proc_sample%','db2inst1'));
print_r($mp)
/*
* Prints
Array
Array
(
[PROC_SAMPLE1] => Array
(
[type] => PROCEDURE
[catalog] => DB2INST1
[schema] => DB2INST1
[remarks] =>
)
)
*/