This topic is locked

How to display data returned by stored procedure

10/5/2017 5:43:25 PM
PHPRunner Tips and Tricks
admin

In this example we will use SQL Server. Here is a very simple stored procedure that does nothing but selects all data from table named 'test'.

CREATE PROCEDURE [dbo].[test_proc]

AS

BEGIN

SET NOCOUNT ON;

SELECT * from test

END


This is how you can display this data in PHPRunner:

  1. Add 'test' table or any other table to the project
  2. Add the following code to List page: CustomQuery event:

return DB::Query("EXEC test_proc");


3. Add the following code to List page: FetchRecords event:

return $rs->fetchAssoc();


This is pretty much it.