Description
array pbms_next_metadata (
[resource $pbms]
)
Fetches the next name/value pair from the metadata cursor while advancing the cursor to the next row.
The return value is an array of two strings, the first is the metadata name and the second is the value
associated with the name.
Parameters
- $pbms
- A valid PBMS connection resource. If $pbms is not specified, the last link opened by pbms_connect() is assumed. If no such link is found, it will try to create one as if pbms_connect() was called with no arguments. If by chance no connection is found or established, an E_WARNING level error is generated.
Return Values
Returns a 2 value array containing the metadata name and value on success.
Returns FALSE on failure or if the end of the metadata cursor has been reached.
Use pbms_errno() and pbms_error() to retrieve error details.
If there is no error then the end of the cursor has been reached.
Example
<?php
pbms_connect();
// Create a BLOB for our test
$blob_ref = pbms_put_data("A tiny BLOB");
//-----------
// Dump the metadata for the BLOB
pbms_get_info($blob_ref); // Get the BLOB info.
$cnt = pbms_reset_metadata();
while ($cnt) {
$data = pbms_next_metadata();
printf("%s:%s\n", $data[0], $data[1]);
$cnt--;
}
pbms_close();
?>