Returns TRUE on success.
Returns FALSE on failure. Use pbms_errno() and pbms_error() to retrieve error details.
<?php pbms_connect(); // Assuming the names are already in the pbms_metadata_header table. pbms_add_metadata("Header1", "PHPTest"); pbms_add_metadata("Blob Name", "Little BLOB"); $blob_ref1 = pbms_put_data("A tiny BLOB"); pbms_clear_metadata("Blob Name"); pbms_add_metadata("Blob Name", "A bigger BLOB"); $blob_ref2 = pbms_put_data("A tiny bit larger BLOB"); //----------- pbms_clear_metadata(); $blob_ref3 = pbms_put_data("A BLOB with no name."); //----------- pbms_get_info($blob_ref1); // Get the BLOB info. printf("Header1 = \"%s\"\n", pbms_get_metadata_value("Header1")); printf("PHPTest = \"%s\"\n", pbms_get_metadata_value("Blob Name")); //----------- pbms_get_info($blob_ref2); // Get the BLOB info. printf("Header1 = \"%s\"\n", pbms_get_metadata_value("Header1")); printf("PHPTest = \"%s\"\n", pbms_get_metadata_value("Blob Name")); //----------- // Dump the metadata for the BLOB with no name pbms_get_info($blob_ref3); // 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(); ?>