Returns a string containing the BLOB on success.
Returns FALSE on failure. Use pbms_errno() and pbms_error() to retrieve error details.
<?php pbms_connect(); //----------- // Create a BLOB and insert it into a table. // Assume that the table exists. $blob_ref = pbms_put_data("A tiny BLOB for a table", "bobtest" ); query = sprintf("insert into bobtest(id, name) Values(1, \"%s\")", $blob_ref); mysql_query($query); // Fetch the BLOB back again. $result =mysql_query("select name from bobtest where id = 1"); $row = mysql_fetch_row($result); printf("NOTE: blob ref stored in table: \"%s\" is not the same as what was inserted \"%s\" \n", $row[0], $blob_ref) printf("The first 10 bytes of the BLOB \"%s\"\n", pbms_get_data_range($row[0], 0, 9)); pbms_close(); ?>