我正在使用 oracle 适配器连接到数据库,这是 application.ini 中的配置,
resources.db.adapter = "Oracle"
resources.db.params.host = "localhost"
resources.db.params.username = "user"
resources.db.params.password = "2012"
resources.db.params.dbname = "books"
resources.db.isDefaultTableAdapter = true
在这里我如何调用存储过程
$db = Zend_Db_Table::getDefaultAdapter();
try {
// $sql = "select * from dual";
$sql = "begin BA_OPERATIONS_PKG.GETMEMBERCRED(" .
":I_USER_ID, :DATA_REC); end;";
$statement = new Zend_Db_Statement_Oracle($db, $sql);
$params = array(
'I_USER_ID' => $userId
);
// Create a cursor
$cursor = new Zend_Db_Cursor_Oracle($db);
// Bind the cursor as a parameter. This SHOULD push a new cursor in the
// $_bindCursor stack from Zend_Db_Statement.
$statement->bindCursor('DATA_REC', $cursor);
$statement->execute($params);
echo $cursor;
} catch (Exception $e) {
print_r($e->getMessage());
}
这是我的例外
include_once(Zend\Db\Cursor\Oracle.php) [function.include-once]: failed to open stream: No such file or directory in D:\ZendFramework\library\Zend\Loader.php