12-14-2014
It should, could you provide a sample input file?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
This is my input file:
ali 5 usa abc
abu 4 uk bca
alan 6 brazil bac
pinky 10 utah sdc
My desired output:
pinky 10 utah sdc
alan 6 brazil bac
ali 5 usa abc
abu 4 uk bca
Based on the column two, I want to do the descending order and print out other related column at the... (3 Replies)
Discussion started by: patrick87
3 Replies
2. Shell Programming and Scripting
I have an input file like this...
AAAlkalines Energizer
AAAlkalines Energizer
AAAlkalines Energizer
AAAlkalines Sunlight
AAAlkalines Sunlight
AAAlkalines Sunlight
AAAlkalines Energizer
AAAlkalines Energizer
AAAlkalines Energizer
AAASalines ... (7 Replies)
Discussion started by: malcomex999
7 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I am running on AIX.I have a question about sorting in UNIX.
if my file is something like this:
a c
b d
a b
b c
a a
I want to sort on column 1 only. The following statement does not seem to work, it still considers the rest of the line in the sorting results: sort... (2 Replies)
Discussion started by: gio001
2 Replies
4. UNIX for Dummies Questions & Answers
If my data is numerical :
1 = 101
2 = 102
3 = 104
4 = 104
7 = 103
8 = 103
9 = 105
I need the result like below:
1 = 101
2 = 102
3 = 103
4 = 103
7 = 104
8 = 104
9 = 105 (4 Replies)
Discussion started by: GeodusT
4 Replies
5. Shell Programming and Scripting
How to sort based on the 4 the column . The input data has a header and output needs to be sorted based on the 4th column rbcid.
I tried below code but not getting results
sort -u -t'|' -k4,4r file1 > file2
time|tourit|nofdays|rbcid|blank|type|value|nill|valuedesc|name... (6 Replies)
Discussion started by: samrat dutta
6 Replies
6. Shell Programming and Scripting
Hi,
I have two text files
file 1 with N lines
AAAAA 2.092290E-12
BBBBB 1.727740E-07
CCCCC 9.608710E-17
DDDDD 0.000000E+00
EEEEE 0.000000E+00
FFFFF 0.000000E+00
GGGGG 0.000000E+00
HHHHH 0.000000E+00
IIIII 3.300320E-04
...
The text in the first column is unique for each row and... (4 Replies)
Discussion started by: f_o_555
4 Replies
7. Shell Programming and Scripting
Hi,
I am using SUN SOLARIS (SunOS sun4v sparc SUNW, T5240).
I have a huge data file with header and trailer. This file gets used into an ETL process. ETL skips the header record (which is the first record of the file) and loads the rest of the record. The file can be delimited (comma,... (5 Replies)
Discussion started by: Saanvi1
5 Replies
8. UNIX for Beginners Questions & Answers
Hi all, (5 Replies)
Discussion started by: KMusunuru
5 Replies
9. Shell Programming and Scripting
How to sort the following output based on lowest to highest BE?
The following sort does not work.
$ sort -t. -k1,1n -k2,2n bfd.txt
BE31.116 0s 0s DOWN DAMP
BE31.116 0s 0s DOWN DAMP
BE31.117 0s 0s ... (7 Replies)
Discussion started by: sand1234
7 Replies
10. Shell Programming and Scripting
I have a string of pre defined ip address list which will always remain constant their order will never change like in below sample:
iplist=8.8.5.19,9.7.5.14,12.9.9.23,8.8.8.14,144.1.113
In the above example i m considering only 5 ips but there could be many more.
Now i have a file which... (15 Replies)
Discussion started by: mohtashims
15 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)