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 ?


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.