We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Get output parameter from procedure

My Code :

        $item = new Items2;
        $connection = $item->getReadConnection();
        $sql = "CALL `OLViewItemsListViewAllWithCount`('','','',0,0,0,0,0,0,0,'2018-05-15',0,0,10,@aa);";
        $items = new Resultset(null,$item,$connection->query($sql));

i need to get the @aa from this Result as a output parameter

how can i get it ?



13.8k

Have you tried dumping the variable?

var_dump($items); exit;

What happens if you dump the result of $connection->query($sql). As far as I know that's a PDO object. I don't think you need to try to put that in a Resultset.