This topic is locked

Override List page query with stored procedure

7/21/2020 3:39:18 PM
PHPRunner General questions
A
asawyer13 authorDevClub member

I am obviously not understanding something.
I have a list page. I have a search panel on it. I'm wanting to limit the number of records being returned so I thought I'd use a mysql stored procedure.
I want to take the values that the user is entering in the search panel and use them to call a stored procedure. For now I am hard coding the stored procedure values using the technique I found at Here
So in the Custom Query I have

return DB::Query("CALL spGetData(1,'1','1245',NULL)");



and in Fetch Records I have

return $rs->fetchAssoc();


When I run the List page I enter info in the search panel and then press Search and it uses those values instead of calling the stored procedure. I am for sure not doing something right.
Alan

Sergey Kornilov admin 7/21/2020

I'm not quite sure what the following means: "it uses those values instead of calling the stored procedure". Please elaborate.
Also, I can add that in version 10.4 you can simplify this process by using SQL Views:

https://xlinesoft.com/phprunner/docs/sql-views.htm

FrankR_ENTA 7/22/2020

And the SQL Views - are downright Awesome. <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=92051&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />