actually the column 2 value is not constant and it will vary based on different ids, so cant check with that particular id . Need to get the value if i fetched the userid and corresponding password
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hello everyone.
I beg your guys pardon please.
I try to ls -al in many path/directories. So, I put the code in text file which look like below;
ls -al /
ls -al /etc
ls -al /etc/default
...
however, when I paste it to Solaris over SecureCRT, it seems the code was escaped from "-" to... (0 Replies)
Hi,
Anyone can help me on how to replace the qoutes
inside the pipe | in my Text File like belows;
"AAAA"|"Test "1-A""|"Test AAAA"|"This is A"
"BBBB"|"Test "1-B""|"Test BBBB"|"This is B"
"CCCC"|"My Test C"|"Test "CCCC""|"This is C"
The output I need like belows;
"AAAA"|"Test 1-A"|"Test... (12 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
logs:
"/home/abc/public_html/index.php"
"/home/abc/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
"/home/xyz/public_html/index.php"
how to use "cut" or "awk" or "sed" to get the following result:
abc
abc
xyz
xyz
xyz (8 Replies)
Hi
I'm trying to run a script " abc.sh" which triggers "use.sh" .
abc.sh is nothing but a "expect" script which provides username and password automatically to the use.sh script.
Please find below the scripts:
#abc.sh
#!/usr/bin/expect -f
exec /root/use.sh
expect "*name*"
send... (1 Reply)
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
LEARN ABOUT PHP
db2_fetch_object
DB2_FETCH_OBJECT(3) 1 DB2_FETCH_OBJECT(3)db2_fetch_object - Returns an object with properties representing columns in the fetched rowSYNOPSIS
object db2_fetch_object (resource $stmt, [int $row_number = -1])
DESCRIPTION
Returns an object in which each property represents a column returned in the row fetched from a result set.
PARAMETERS
o $stmt
- A valid stmt resource containing a result set.
o $row_number
- Requests a specific 1-indexed row from the result set. Passing this parameter results in a PHP warning if the result set uses a
forward-only cursor.
RETURN VALUES
Returns an object representing a single row in the result set. The properties of the object map to the names of the columns in the result
set.
The IBM DB2, Cloudscape, and Apache Derby database servers typically fold column names to upper-case, so the object properties will
reflect that case.
If your SELECT statement calls a scalar function to modify the value of a column, the database servers return the column number as the
name of the column in the result set. If you prefer a more descriptive column name and object property, you can use the AS clause to assign
a name to the column in the result set.
Returns FALSE if no row was retrieved.
EXAMPLES
Example #1
A db2_fetch_object(3) example
The following example issues a SELECT statement with a scalar function, RTRIM, that removes whitespace from the end of the column.
Rather than creating an object with the properties "BREED" and "2", we use the AS clause in the SELECT statement to assign the name
"name" to the modified column. The database server folds the column names to upper-case, resulting in an object with the properties
"BREED" and "NAME".
<?php
$conn = db2_connect($database, $user, $password);
$sql = "SELECT breed, RTRIM(name) AS name
FROM animals
WHERE id = ?";
if ($conn) {
$stmt = db2_prepare($conn, $sql);
db2_execute($stmt, array(0));
while ($pet = db2_fetch_object($stmt)) {
echo "Come here, {$pet->NAME}, my little {$pet->BREED}!";
}
db2_close($conn);
}
?>
The above example will output:
Come here, Pook, my little cat!
SEE ALSO db2_fetch_array(3), db2_fetch_assoc(3), db2_fetch_both(3), db2_fetch_row(3), db2_result(3).
PHP Documentation Group DB2_FETCH_OBJECT(3)