php - Set Parameter with TableGateway Select Function show error undefined variable -
I am creating a function in my model:
public function getAllMenuByOnlyActionPage ($ actionlot) ) {$ Act = Trim ($ Action Lot); $ (Result ('position! =?' & Gt; 13)) - & gt; Where (array ('action' => $ act)) - & gt; Order ('id asc');}); $ Result = array (); Foreign Currency ($ result as $ line) {$ result [] = $ line; } Returns $ results; } When I try to execute, its show me the notice: undefined variable: act . I already see this link but I want to set parameters for this function. Thanks
Try
$ result = $ this- & gt; ; Table Gateway - & gt; Select (Select function $) Usage ($ Act) {$ select- & gt; where (array ('position! =?' = & Gt; 13)) -> where (array ('action' = & Gt; $ Act)) - & gt; Order ('ID ASC');});
Comments
Post a Comment