From dd1e55aba01d43b90bc7bb223ac676ec0fb70657 Mon Sep 17 00:00:00 2001 From: "Frank M. Kromann" Date: Wed, 10 Oct 2001 16:46:50 +0000 Subject: [PATCH] Documentation for create_blob and create_clob git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@59318 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/fbsql.xml | 102 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 101 insertions(+), 1 deletion(-) diff --git a/functions/fbsql.xml b/functions/fbsql.xml index ba897423f3..82079f4083 100644 --- a/functions/fbsql.xml +++ b/functions/fbsql.xml @@ -1,5 +1,5 @@ - + FrontBase functions FrontBase @@ -354,6 +354,106 @@ + + + fbsql_create_blob + Create a BLOB + + + Description + + + resource fbsql_create_blob + string blob_data + resource + + link_identifier + + + + + + Returns: A resource handle to the newly created blob. + + + fbsql_create_blob creates a blob from blob_data. + The returned resource handle can be used with insert and update commands + to store the blob in the database. + + + <function>fbsql_create_blob</function> example + +<?php + $link = fbsql_pconnect ("localhost", "_SYSTEM", "secret") + or die ("Could not connect"); + $filename = "blobfile.bin"; + $fp = fopen($filename, "rb"); + $blobdata = fread($fp, file_size($filename)); + fclose($fp); + + $blobHandle = fbsql_create_blob($blobdata, $link); + + $sql = "INSERT INTO BLOB_TABLE (BLOB_COLUMN) VALUES ($blobHandle);"; + $rs = fbsql_query($sql, $link); +?> + + + + See also: fbsql_create_clob. + + + + + + + fbsql_create_clob + Create a CLOB + + + Description + + + resource fbsql_create_clob + string clob_data + resource + + link_identifier + + + + + + Returns: A resource handle to the newly created CLOB. + + + fbsql_create_clob creates a clob from clob_data. + The returned resource handle can be used with insert and update commands + to store the clob in the database. + + + <function>fbsql_create_clob</function> example + +<?php + $link = fbsql_pconnect ("localhost", "_SYSTEM", "secret") + or die ("Could not connect"); + $filename = "clob_file.txt"; + $fp = fopen($filename, "rb"); + $clobdata = fread($fp, file_size($filename)); + fclose($fp); + + $clobHandle = fbsql_create_clob($clobdata, $link); + + $sql = "INSERT INTO CLOB_TABLE (CLOB_COLUMN) VALUES ($clobHandle);"; + $rs = fbsql_query($sql, $link); +?> + + + + See also: fbsql_create_blob. + + + + fbsql_database_password