Data Source: Stored Procedure with IN Paramters

stored proc

* This feature is only available with a commercial license.

 

phpGrid now supports stored procedure (version 7.5+). It works with stored proc without parameters; and stored proc with IN parameter(s). Stored proc with OUT parameter currently is not directly supported, but possible by using local array as a workaround.

It’s easy to use. Pass the stored proc name as 1st parameter into the phpGrid constructor. And parameter values as the 2nd (must be the same order defined in stored proc). You only need those two parameters.

Stored proc with no parameter

1
2
3
// stored proc with 2 in parameters
$dg = new C_DataGrid("CALL GetTotalAssets()");
$dg -> display();

Stored proc with 2 IN parameters

1
2
$dg = new C_DataGrid("CALL GetOfficeByCountryState(?, ?)", ['USA', 'CA']);
$dg -> display();

Yeap, it’s that easy. No muss, no fuss.