Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cubrid_lob_get(3) [php man page]

CUBRID_LOB_GET(3)							 1							 CUBRID_LOB_GET(3)

cubrid_lob_get - Get BLOB/CLOB data

SYNOPSIS
array cubrid_lob_get (resource $conn_identifier, string $sql) DESCRIPTION
cubrid_lob_get(3) is used to get BLOB/CLOB meta info from CUBRID database, CUBRID gets BLOB/CLOB by executing the SQL statement, and returns all LOBs as a resource array. Be sure that the SQL retrieves only one column and its data type is BLOB or CLOB. Remember to use cubrid_lob_close(3) to release the LOBs if you don't need it any more. PARAMETERS
o $conn_identifier -Connection identifier. o $sql -SQL statement to be executed. RETURN VALUES
Return an array of LOB resources, when process is successful. FALSE, when process is unsuccessful. EXAMPLES
Example #1 cubrid_lob_get(3) example <?php $conn = cubrid_connect ("localhost", 33000, "demodb", "dba"); cubrid_execute($conn,"DROP TABLE if exists doc"); cubrid_execute($conn,"CREATE TABLE doc (id INT, doc_content CLOB)"); cubrid_execute($conn,"INSERT INTO doc VALUES (5,'hello,cubrid')"); $lobs = cubrid_lob_get($conn, "SELECT doc_content FROM doc WHERE id=5"); echo "Doc size: ".cubrid_lob_size($lobs[0])." bytes"; cubrid_lob_export($conn, $lobs[0], "doc_5.txt"); cubrid_lob_close($lobs); cubrid_disconnect($conn); ?> SEE ALSO
cubrid_lob_close(3), cubrid_lob_size(3), cubrid_lob_export(3), cubrid_lob_send(3). PHP Documentation Group CUBRID_LOB_GET(3)

Check Out this Related Man Page

CUBRID_LOB_SIZE(3)							 1							CUBRID_LOB_SIZE(3)

cubrid_lob_size - Get BLOB/CLOB data size

SYNOPSIS
string cubrid_lob_size (resource $lob_identifier) DESCRIPTION
cubrid_lob_size(3) is used to get BLOB/CLOB data size. PARAMETERS
o $lob_identifier -LOB identifier. RETURN VALUES
A string representing LOB data size, when process is successful. FALSE, when process is unsuccessful. CHANGELOG
+--------+-----------------------------------------------+ |Version | | | | | | | Description | | | | +--------+-----------------------------------------------+ | 8.4.0 | | | | | | | Change return value type from int to string. | | | | +--------+-----------------------------------------------+ EXAMPLES
Example #1 cubrid_lob_size(3) example <?php $lobs = cubrid_lob_get($con, "SELECT doc_content FROM doc WHERE doc_id=5"); echo "Doc size:".cubrid_lob_size($lobs[0]); cubrid_lob_export($conn, $lobs[0], "doc_5.txt"); cubrid_lob_close($lobs); ?> SEE ALSO
cubrid_lob_get(3), cubrid_lob_close(3), cubrid_lob_export(3), cubrid_lob_send(3). PHP Documentation Group CUBRID_LOB_SIZE(3)
Man Page

13 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script for reading BLOB data

Hi, this may not be a right place to post my question. But still.... I have database table of which one field contains BLOB data. Actually the BLOB data is xml script. Now How do I retrieve that xml script to xml file on unix(or windows). I will have to loop thru the records. There are... (0 Replies)
Discussion started by: shriashishpatil
0 Replies

2. UNIX for Dummies Questions & Answers

How to read from txt file and use that as an array

Hi Guys How u all doing? I am having tough time to achieve this I have a unix .ksh script which calls sql script Right now I harcoded column id's in sql script but I want to read them from a txt file 1084,1143,1074,1080,1091,1090,1101,1069,1104,1087,1089,1081 I want to read this... (4 Replies)
Discussion started by: pinky
4 Replies

3. UNIX for Dummies Questions & Answers

SQL Error "The cursor or statement is not available"

Trying to load a record into my test database and am getting an error: "The cursor or statement is not available". I've attached the file I'm trying to load and the file containing the sql I'm trying to run. Trying to copy a record from my production database to my test database, but the... (0 Replies)
Discussion started by: Monte Heeren
0 Replies

4. UNIX for Dummies Questions & Answers

SQL Connection check though Scripting

Hi Guys, I wanted to check the sql connection through scripting if it is avilable then proceed else stop the process I was trying sqlplus -L username/passwd@sid if this is not sucess it gives non-zero. but if it is success it is going into the sqlplus prompt. So how could i get out... (2 Replies)
Discussion started by: Swapna173
2 Replies

5. Shell Programming and Scripting

Using gawk to clean up SQL

Hi, What would be the best awk commands to change this: CREATE TABLE "allow_ip_services" ( "host" varchar(20) default NULL, "user" varchar(30) NOT NULL, "services" varchar(100) default NULL, KEY "host" ("host"), KEY "user" ("user") ); into this CREATE TABLE... (4 Replies)
Discussion started by: ripat
4 Replies

6. Shell Programming and Scripting

Creating CLOB object in unix

Hi All, I have a big file (basically .log file) want to store in oracle database. Please help me in preparing CLOB object in unix. The log file is stored in some location on unix file server, prepare clob of that file and store in DB. Any sample code or link Thanks Rajesh (1 Reply)
Discussion started by: rajeshorpu
1 Replies

7. UNIX for Advanced & Expert Users

Unix commands Related to

Hi all, Does unix has any commands for creating BLOB and CLOB objects. Please forward me any sites or samples (2 Replies)
Discussion started by: rajeshorpu
2 Replies

8. Shell Programming and Scripting

Limit on a File size.

Hi All, I want to store 32KB of file in Oracle DB into CLOB field. I am not able to insert more than 32KB of file into CLOB. So i want to put a limit on the file size. I am using k shell. My file size will dynamically increase its size, i want to check the file size if it is more than 32KB... (1 Reply)
Discussion started by: rajeshorpu
1 Replies

9. Shell Programming and Scripting

ORA-01756 Error while inserting a file in CLOB field

Hi, Please guide me where i am doing wrong, i am getting ORA-01756:quoted string not properly terminated when i am trying to insert file into CLOB cloumn of Oracle DB. Please find below the code where log file variable is myLogFile. Please let me know where i am doing wrong. ... (0 Replies)
Discussion started by: rajeshorpu
0 Replies

10. UNIX for Dummies Questions & Answers

Greetings to all

Dear board members: I'm a current dba in Oracle and looking to improve me UNIX/Linux skills. I can get around the environment but no pro by far. Once I get to the database level, its all sql from that point on. I'm hoping some of you can give me some input as to where I can practice, and make... (1 Reply)
Discussion started by: azeemsyed
1 Replies

11. Shell Programming and Scripting

UNIX variable to SQL statement

The following is my script : #!/bin/bash echo "please give app_instance_id" read app_instance_id echo "id is $app_instance_id" export app_id=app_instance_id sqlplus -s nnviewer/lookup@//nasolora008.enterprisenet.org:1521/LOAD3 @test.sql<<EOF SPOOL /home/tibco/MCH/Data/qa/raak/name.xls... (4 Replies)
Discussion started by: raakeshr
4 Replies

12. Windows & DOS: Issues & Discussions

SQL Server import csv or txt on a Solaris box

New to using sql server and unix, but say I have here /home/foo/file.txt Can I use some kind of process to push that .txt into a sql server? Or Is there a sql server utility that can be configured to find a unix box and go into /home/foo/file.txt and slurp it up:) Or is there any PC and... (5 Replies)
Discussion started by: sas
5 Replies

13. Shell Programming and Scripting

Reading Multi Line SQL in UNIX

Hello, Currently, I am reading few queries from the below .sql file --SOURCE TABLE NAME --SOURCE QUERY SEL COL1, COL2, COL3, COL4, COL5, COL6, COL7 WHERE COL5 = '2015-11-04 16:24:00.000000' FROM SOURCE TABLE; --TARGET TABLE NAME --TARGET QUERY SEL COLUMN1, COLUMN2, COLUMN3, COLUMN4,... (4 Replies)
Discussion started by: ronitreddy
4 Replies