Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fbsql_create_blob(3) [php man page]

FBSQL_CREATE_BLOB(3)							 1						      FBSQL_CREATE_BLOB(3)

fbsql_create_blob - Create a BLOB

SYNOPSIS
string fbsql_create_blob (string $blob_data, [resource $link_identifier]) DESCRIPTION
Creates a BLOB from the given data. PARAMETERS
o $blob_data - The BLOB data. o $ link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect(3) was called with no arguments. RETURN VALUES
Returns a resource handle to the newly created BLOB, which can be used with insert and update commands to store the BLOB in the database. EXAMPLES
Example #1 fbsql_create_blob(3) example <?php $link = fbsql_pconnect("localhost", "_SYSTEM", "secret") or die("Could not connect"); $filename = "blobfile.bin"; $fp = fopen($filename, "rb"); $blobdata = fread($fp, filesize($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(3), fbsql_read_blob(3), fbsql_read_clob(3), fbsql_set_lob_mode(3). PHP Documentation Group FBSQL_CREATE_BLOB(3)

Check Out this Related Man Page

FBSQL_READ_CLOB(3)							 1							FBSQL_READ_CLOB(3)

fbsql_read_clob - Read a CLOB from the database

SYNOPSIS
string fbsql_read_clob (string $clob_handle, [resource $link_identifier]) DESCRIPTION
Reads CLOB data from the database. If a select statement contains BLOB and/or CLOB columns FrontBase will return the data directly when data is fetched. This default behav- ior can be changed with fbsql_set_lob_mode(3) so the fetch functions will return handles to BLOB and CLOB data. If a handle is fetched a user must call fbsql_read_clob(3) to get the actual CLOB data from the database. PARAMETERS
o $clob_handle - A CLOB handle, returned by fbsql_create_clob(3). o $ link_identifier -A FrontBase link identifier returned by fbsql_connect(3) or fbsql_pconnect(3).If optional and not specified, the function will try to find an open link to the FrontBase server and if no such link is found it will try to create one as if fbsql_connect(3) was called with no arguments. RETURN VALUES
Returns a string containing the specified CLOB data. EXAMPLES
Example #1 fbsql_read_clob(3) example <?php $link = fbsql_pconnect("localhost", "_SYSTEM", "secret") or die("Could not connect"); $sql = "SELECT CLOB_COLUMN FROM CLOB_TABLE;"; $rs = fbsql_query($sql, $link); $row_data = fbsql_fetch_row($rs); // $row_data[0] will now contain the clob data for the first row fbsql_free_result($rs); $rs = fbsql_query($sql, $link); fbsql_set_lob_mode($rs, FBSQL_LOB_HANDLE); $row_data = fbsql_fetch_row($rs); // $row_data[0] will now contain a handle to the CLOB data in the first row $clob_data = fbsql_read_clob($row_data[0]); fbsql_free_result($rs); ?> SEE ALSO
fbsql_create_clob(3), fbsql_read_blob(3), fbsql_set_lob_mode(3). PHP Documentation Group FBSQL_READ_CLOB(3)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find without pathname

How can I get the results of a find back without the pathname for example if i do find ../../ -name \*.sql i dont want to see directory/directory/filename.sql I only want to see filename.sql (3 Replies)
Discussion started by: MBGPS
3 Replies

2. Shell Programming and Scripting

sql insert command

Hi, sqlplus -s / <<EOF > /dev/null insert into table1 (a1, a2, a3) values ('a',1,'b'); commit; EOF in the above code can i pass the values to the insert command from shell script like this: insert into table1 (a1, a2, a3) values ('$a',$b,'$c'); If yes, how is it passed?? Any... (2 Replies)
Discussion started by: abey
2 Replies

3. Programming

process error

Hi all,;) i need to exexute OS commands from oracle prompt. For that i did the following steps 1) created a java source called "Host". 2)created a pl/sql procedure called'Host_Command '. 3)issued the following statements EXEC dbms_java.grant_permission( 'TMS','SYS:java.io.FilePermission',... (2 Replies)
Discussion started by: ravi raj kumar
2 Replies

4. UNIX for Dummies Questions & Answers

Help needed with find command

Hi Guys, Can someone help with this. I have to find out a file name which calls the following sql script "abhishek_to_sdw.sql". In other words it contains a pattern like "abhishek_to_sdw.sql". I have found out using "find" command that the file abhishek_to_sdw.sql is existing on the... (4 Replies)
Discussion started by: max29583
4 Replies

5. UNIX for Dummies Questions & Answers

parsing filenames

How can I loose a part of the filename I want to drop the “_<Number>.sql” Below I have a listing of file names in a file Eg : CREDIT_DEL_033333.sql I want it to be CREDIT_DEL ATM_DEBIT_CARD_0999999.sql I want it to be ... (3 Replies)
Discussion started by: jville
3 Replies

6. UNIX for Dummies Questions & Answers

Create directories from a sql file?

Hi, I have a sql file which has CREATE and INSERT commands in it. Basically, inside this file, a table will be created and the data will be inserted into the table. I was wondering if there is a way for me to create directories from this file? Thanks in advance (4 Replies)
Discussion started by: tezarin
4 Replies

7. Shell Programming and Scripting

How to find out which sql i have installed .

I use CentOS . I want to know how to find out which sql i have installed .. Can anyone tell .. (2 Replies)
Discussion started by: madhumathikv
2 Replies

8. Shell Programming and Scripting

find and replace a string in a file without the use of temp file

Hi - I am looking for a replacing a string in a in multiple *.sql files in directory with a new string without using a temporary file Normally I can use sed command as below for W in ls `FILE*.sql` do sed 's/OLD/NEW/g' $W > TEMPFILE.dat mv TEMPFILE.dat $W done But Here in my... (9 Replies)
Discussion started by: raghutapal
9 Replies

9. Shell Programming and Scripting

Multiple lines into one line when ; is found

I have sql's in a file separated by ";", need to put the sql in one single line till i find a ";" The input file is like this SELECT s.sid, s.serial#, p.spid as "OS PID", s.username, s.module, ... (6 Replies)
Discussion started by: ilugopal
6 Replies

10. Emergency UNIX and Linux Support

Insert data into sql queries from a file

Hello friends, I need to insert data from a file to another. I need this to form an sql query file which will consist of 50.000 INSERT INTO sentences. my sql query file will consist of 50.000 times the below line consecutively: insert into subscriber... (6 Replies)
Discussion started by: EAGL€
6 Replies

11. Shell Programming and Scripting

Executing Procedure from shell script..

Hello, I created a sql file to create a Procedure, and it was successfully created. I created a sql file to execute the procedure, and it did without any errors, but i dont see the data been updated. The Execute procedure.sql script is: BEGIN set serveroutput on size 1000000 execute... (5 Replies)
Discussion started by: msrahman
5 Replies

12. Shell Programming and Scripting

Need to find a string in files

Hi, I have a directory nsk, files a.sql, b.sql, c.sql, d.sql, assuming that I have line 'INSERT ALL INTO abc' in a.sql and c.sql I need to list a filename, line number and complete line which contains ''INSERT ALL INTO abc' irrespective of case. also in my files mentioned 'INSERT ALL... (4 Replies)
Discussion started by: sunnix
4 Replies

13. Programming

how to output data with only an specific string on it

hi! i made an sql script but i do not know how to just output all the lines that starts with an specific string. and that string, you will input it before i run the sql for example: INPUT NAME: JOHN i just want to output lines that starts with JOHN (2 Replies)
Discussion started by: engr.jay
2 Replies

14. UNIX for Dummies Questions & Answers

How to compare to values returned from sql in shell scripting?

hey i am using this code to connect to sql , store the value in variable and then compare it with another variable after some time by executing the same query but the desired result is not coming #!/bin/bash val=$(sqlplus -s rte/rted2@rel76d2 <<ENDOFSQL set heading off set feedback off... (11 Replies)
Discussion started by: ramsavi
11 Replies

15. Shell Programming and Scripting

Regex for filename in grep

I want to print the filename keyword="XXTNL_AVSKRIV2ING" ftype="sql' I wan to search the keyword in all the sql files and the output shoul dbe filename:count grep -iwc "$keyword" *.$ftype | grep -v ":0$" But the output does not dispaly the filename which contains space as... (4 Replies)
Discussion started by: millan
4 Replies