Hello guys
I want to retrieve two data from a file, like this:
bash-2.03$ cat numtest
123456
123457
bash-2.03$ more ./test_num
#!/bin/bash
num1=
num2=
cnt=1
while read x
do
num${cnt}=$x
cnt=$(($cnt+1))
done <$1
echo $num1 "\n" $num2
But when i executed this script, error... (2 Replies)
How to write a shell script to retrieve datas from database after that this database are redirect to a excell sheet and then i got a mail that gives details about the database with the column name and data..
I m using oracle 9i...
Thanks,
Anup Das (2 Replies)
Hi All,
It takes around one hour to retrieve 3 lakhs data from DB. I feel this can be still more reduced, please help me in improvising the below code, to get it retrieve faster, atleast 30 to 45 minutes.
sqlplus -s ${OCAU_DB_UNAME}/${OCAU_DB_UPSWD}@${OCAU_DB_NAME} > /apps/data/filedata.txt... (4 Replies)
I am a newbie to Unix and slowly learning it. I have a large data set with 8 different columns. I want to compare two columns and retrieve data if the two columns have similar number.
I have attached the example. There are two columns (S-Contig and N-Contig). I want to retrieve the data from... (7 Replies)
Hello Experts,
I have come back to this forum after a while now, since require a better way to get my result.. My query is as below..
I have 3 files -- 1 Input file, 2 Data files .. Based on the input file, data has to be retreived matching from two files which has one common key..
For EX:... (4 Replies)
Hello
Please I ask if it is possible to recover data that is stored on a remote machine that I access via ssh on a usb ? if so, how?
Thank you so much (5 Replies)
I would like to recover the data from 3 text tags.
These three markers are located between the tags specific location <tag1> and </tag1> knowing that they are in many places.
In File.txt:
<tag2>txt2</tag2>
<tag3>txt3</tag3>
<tag4>txt4</tag4>
....
<tag1>
<tag2>txt2</tag2>... (3 Replies)
Hi guys, I need your help.
I have two files:
file1
1
3
5
file2
1,XX
2,AA
3,BB
4,CC
5,DD
I would like to compare the first column and where they are equal to write that output in a new file:
1,XX
3,BB (7 Replies)
Hi Everyone,
I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file? Please let me know what is the awk command for this?
Regards
Rakesh (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
I am looking for awk command to retrieve only the record number 23 and record number 89 from a unix file?... (6 Replies)
Discussion started by: rakeshp
6 Replies
LEARN ABOUT PHP
maxdb_stmt_bind_result
MAXDB_STMT_BIND_RESULT(3) 1 MAXDB_STMT_BIND_RESULT(3)maxdb_stmt_bind_result - Binds variables to a prepared statement for result storage
Procedural style
SYNOPSIS
bool maxdb_stmt_bind_result (resource $stmt, mixed &$var1, [mixed &$...])
DESCRIPTION
Object oriented style
bool maxdb_stmt::bind_result (mixed &$var1, [mixed &$...])
maxdb_stmt_bind_result(3) is used to associate (bind) columns in the result set to variables. When maxdb_stmt_fetch(3) is called to fetch
data, the MaxDB client/server protocol places the data for the bound columns into the specified variables $var1, ....
Note
Note that all columns must be bound prior to calling maxdb_stmt_fetch(3). Depending on column types bound variables can silently
change to the corresponding PHP type.
A column can be bound or rebound at any time, even after a result set has been partially retrieved. The new binding takes effect
the next time maxdb_stmt_fetch(3) is called.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
Object oriented style
<?php
$maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB");
if (maxdb_connect_errno()) {
printf("Connect failed: %s
", maxdb_connect_error());
exit();
}
/* prepare statement */
if ($stmt = $maxdb->prepare("SELECT zip, name FROM hotel.city ORDER BY name")) {
$stmt->execute();
/* bind variables to prepared statement */
$stmt->bind_result($col1, $col2);
/* fetch values */
while ($stmt->fetch()) {
printf("%s %s
", $col1, $col2);
}
/* close statement */
$stmt->close();
}
/* close connection */
$maxdb->close();
?>
Example #2
Procedural style
<?php
$link = maxdb_connect("localhost", "MONA", "RED", "DEMODB");
/* check connection */
if (!$link) {
printf("Connect failed: %s
", maxdb_connect_error());
exit();
}
/* prepare statement */
if ($stmt = maxdb_prepare($link, "SELECT zip, name FROM hotel.city ORDER BY name")) {
maxdb_stmt_execute($stmt);
/* bind variables to prepared statement */
maxdb_stmt_bind_result($stmt, $col1, $col2);
/* fetch values */
while (maxdb_stmt_fetch($stmt)) {
printf("%s %s
", $col1, $col2);
}
/* close statement */
maxdb_stmt_close($stmt);
}
/* close connection */
maxdb_close($link);
?>
The above example will output something similar to:
12203 Albany
60601 Chicago
60615 Chicago
45211 Cincinnati
33575 Clearwater
75243 Dallas
32018 Daytona Beach
33441 Deerfield Beach
48226 Detroit
90029 Hollywood
92714 Irvine
90804 Long Beach
11788 Long Island
90018 Los Angeles
70112 New Orleans
10019 New York
10580 New York
92262 Palm Springs
97213 Portland
60018 Rosemont
95054 Santa Clara
20903 Silver Spring
20005 Washington
20019 Washington
20037 Washington
SEE ALSO maxdb_stmt_bind_param(3), maxdb_stmt_execute(3), maxdb_stmt_fetch(3), maxdb_prepare(3), maxdb_stmt_prepare(3), maxdb_stmt_init(3),
maxdb_stmt_errno(3), maxdb_stmt_error(3).
PHP Documentation Group MAXDB_STMT_BIND_RESULT(3)