Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
I have installed sudo on our development server (SPARC,Solaris 9) and trying to edit /etc/sudoers file using visudo. Referred the following sites and not able to find the way.
http://www.courtesan.com/sudo/man/sudoers.html
http://www.kempston.net/solaris/sudo.html
To start with sudo, my... (3 Replies)
Hi all,
I am using Solaris 8 and have several printers (HP lasers or inkjets) connected behind PCs, printing thus being controlled by LPD.
All I can print is ASCII, not very keen, no images, no boxes etc.
Is there any thread (I assure, I have been searching!) or discussion explaning how to set... (0 Replies)
Hello Everyone,
My issue is that I want to traverse a database table row by row and do some action on the value retrieved in each row.
I have gone through a lot of shell script questions/posts. I could find row by row traversal of a file but not a database table.
Please help.
Thanks &... (5 Replies)
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
My original files are like this below and I distinguish them from the AP_ID (file1 has 572 and file2 has 544). Also, the header on file1 has “G_” pre-pended. NOTE: these are only snippets of very large files and much of the data is not present here.
Original File 1:
... (36 Replies)
Hi ALL,
We have requirement in a file, i have multiple rows.
Example below:
Input file rows
01,1,102319,0,0,70,26,U,1,331,000000113200000011920000001212
01,1,102319,0,1,80,20,U,1,241,00000059420000006021
I need my output file should be as mentioned below. Last field should split for... (4 Replies)
This is a question that is related to one I had last August when I was trying to sort/merge two files by millsecond time column (in this case column 6).
The script (below) that helped me last august by RudiC solved the puzzle of sorting/merging two files by time, except it gets lost when the... (0 Replies)
Discussion started by: aachave1
0 Replies
LEARN ABOUT PHP
mssql_fetch_row
MSSQL_FETCH_ROW(3)MSSQL_FETCH_ROW(3)mssql_fetch_row - Get row as enumerated arraySYNOPSIS
array mssql_fetch_row (resource $result)
DESCRIPTION mssql_fetch_row(3) fetches one row of data from the result associated with the specified result identifier. The row is returned as an
array. Each result column is stored in an array offset, starting at offset 0.
Subsequent call to mssql_fetch_row(3) would return the next row in the result set, or FALSE if there are no more rows.
PARAMETERS
o $result
- The result resource that is being evaluated. This result comes from a call to mssql_query(3).
RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows.
EXAMPLES
Example #1
mssql_fetch_row(3) example
<?php
// Connect to MSSQL and select the database
$link = mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi');
mssql_select_db('php', $link);
// Query to execute
$query = mssql_query('SELECT [id], [quote] FROM [quotes] WHERE [id] = '42'', $link);
// Did the query fail?
if (!$query) {
die('MSSQL error: ' . mssql_get_last_message());
}
// Fetch the row
$row = mssql_fetch_row($query);
// Print the 'quote'
echo 'Quote #' . $row[0] . ': "' . $row[1] . '"';
?>
The above example will output something similar to:
Quote #42: "The answer to everything..."
NOTES
Note
This function sets NULL fields to the PHP NULL value.
SEE ALSO mssql_fetch_array(3), mssql_fetch_object(3), mssql_data_seek(3), mssql_result(3).
PHP Documentation Group MSSQL_FETCH_ROW(3)