Friends,
I'm a Unix/Linux Newbie and I do need some HOWTO help with my dedicated server: Linux Redhat 7, EnsimPRo 3.5 control panel
== It's about MySQL setting called "big tables" ==
I have a problem with MySQL when importing large category tree textfiles into the database: I have MySQL... (1 Reply)
Hi,
I have a list of 70 files in a directory and I need to merge the content of each file into one big matrix file (71 columns x 3060 rows).
Each file has the following format only two columns per file:
unique identifier1
randomtext1 randomtext1
a 5
b 3
c 6
d 3
e 2... (11 Replies)
Hello!!
I need to do some performance test using a very big matrix (bi-dimensional array) but I have problems with this.
Is there any limitation in declarations? because if I do this:
int matriz;
It just don't work... it compiles but when i run the program it just closes.
Where can i... (4 Replies)
Hi..
File 1:
1 aa rep
1 dd rep
1 kk rep
2 bb sad
2 ss sad
3 ee dam
File 2
1 apple fruit
2 mango tree
3 lilly flower
output:
1 aaple fruit aa,dd,kk rep (7 Replies)
Say I have two tables like below..
status
HId sName dName StartTime EndTime
1 E E 9:10 10:10
2 E F 9:15 10:15
3 G H 9:17 10:00
logic
Id devName capacity free Line
1 E 123 34 1
2 E 345 ... (3 Replies)
Hi everyone,
I once again got stuck with merging tables and was wondering if someone could help me out on that problem.
I have a number of tab delimited tables which I need to merge into one big one. All tables have the same header but a different number of rows (this could be changed if... (6 Replies)
multiple files to load into different tables,
I have a script show below, but this script loads data from txt file into a table,
but i have multiple input files(xyzload.txt,xyz1load.txt,xyz2load.txt......) in the unix folder ,
can we load these files in diff tables (table 1, table2... (1 Reply)
Hi,
Please excuse me , i have searched unix forum, i am unable to find what i expect ,
my query is , i have 2 files of same structure and having 1 similar field/column , i need to merge 2 tables/files based on the one matched field/column (that is field 1),
file 1:... (5 Replies)
Hi all,
i need help.
I have two csv files with a huge amount of data.
I need the first column of the first file, to be compared with the data of the second, to have at the end a file with the data not present in the second file.
Example
File1: (only one column)
profile_id
57036226... (11 Replies)
Hello All,
just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table.
Can you please suggest why? or any better idea?
export FILE="/abc/autom/file/geo_JOB.csv"
Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies
LEARN ABOUT PHP
db2_lob_read
DB2_LOB_READ(3) 1 DB2_LOB_READ(3)db2_lob_read - Gets a user defined size of LOB files with each invocationSYNOPSIS
string db2_lob_read (resource $stmt, int $colnum, int $length)
DESCRIPTION
Use db2_lob_read(3) to iterate through a specified column of a result set and retrieve a user defined size of LOB data.
PARAMETERS
o $stmt
- A valid stmt resource containing LOB data.
o $colnum
- A valid column number in the result set of the stmt resource.
o $length
- The size of the LOB data to be retrieved from the stmt resource.
RETURN VALUES
Returns the amount of data the user specifies. Returns FALSE if the data cannot be retrieved.
EXAMPLES
Example #1
Iterating through different types of data
<?php
/* Database Connection Parameters */
$db = 'SAMPLE';
$username = 'db2inst1';
$password = 'ibmdb2';
/* Obtain Connection Resource */
$conn = db2_connect($db,$username,$password);
if ($conn) {
$drop = 'DROP TABLE clob_stream';
$result = @db2_exec( $conn, $drop );
$create = 'CREATE TABLE clob_stream (id INTEGER, my_clob CLOB)';
$result = db2_exec( $conn, $create );
$variable = "";
$stmt = db2_prepare($conn, "INSERT INTO clob_stream (id,my_clob) VALUES (1, ?)");
$variable = "THIS IS A CLOB TEST. THIS IS A CLOB TEST.";
db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN);
db2_execute($stmt);
$sql = "SELECT id,my_clob FROM clob_stream";
$result = db2_prepare($conn, $sql);
db2_execute($result);
db2_fetch_row($result);
$i = 0;
/* Read LOB data */
while ($data = db2_lob_read($result, 2, 6)) {
echo "Loop $i: $data
";
$i = $i + 1;
}
$drop = 'DROP TABLE blob_stream';
$result = @db2_exec( $conn, $drop );
$create = 'CREATE TABLE blob_stream (id INTEGER, my_blob CLOB)';
$result = db2_exec( $conn, $create );
$variable = "";
$stmt = db2_prepare($conn, "INSERT INTO blob_stream (id,my_blob) VALUES (1, ?)");
$variable = "THIS IS A BLOB TEST. THIS IS A BLOB TEST.";
db2_bind_param($stmt, 1, "variable", DB2_PARAM_IN);
db2_execute($stmt);
$sql = "SELECT id,my_blob FROM blob_stream";
$result = db2_prepare($conn, $sql);
db2_execute($result);
db2_fetch_row($result);
$i = 0;
/* Read LOB data */
while ($data = db2_lob_read($result, 2, 6)) {
echo "Loop $i: $data
";
$i = $i + 1;
}
} else {
echo 'no connection: ' . db2_conn_errormsg();
}
?>
The above example will output:
Loop 0: THIS I
Loop 1: S A CL
Loop 2: OB TES
Loop 3: T. THI
Loop 4: S IS A
Loop 5: CLOB
Loop 6: TEST.
Loop 0: THIS I
Loop 1: S A BL
Loop 2: OB TES
Loop 3: T. THI
Loop 4: S IS A
Loop 5: BLOB
Loop 6: TEST.
SEE ALSO db2_bind_param(3), db2_exec(3), db2_execute(3), db2_fetch_row(3), db2_prepare(3), db2_result(3).
PHP Documentation Group DB2_LOB_READ(3)