Ok i answer to my self... i hope it will help someone else too.. :-) public function save(MyStuff $vo) { // Get adapter $dbAdapter = $this->tableGateway->getAdapter();
$stmt = $dbAdapter->createStatement(); $stmt->prepare('CALL sp_save_mystuff(?,?, @out)'); $stmt->getResource()->bindParam(1, $vo->id, \PDO::PARAM_INT); $stmt->getResource()->bindParam(2, $vo->name); $stmt->execute(); // Retrieve output parameter $stmt2 = $dbAdapter->createStatement(); $stmt2->prepare("SELECT @out AS id"); $result = $stmt2->execute(); $output = $result->current(); return (int) $output['id']; } -- View this message in context: http://zend-framework-community.634137.n4.nabble.com/ZF2-Stored-procedure-with-out-parameter-tp4660072p4660076.html Sent from the Zend Framework mailing list archive at Nabble.com. -- List: fw-general@lists.zend.com Info: http://framework.zend.com/archives Unsubscribe: fw-general-unsubscr...@lists.zend.com