ODBC_FETCH_ROW(3) 1 ODBC_FETCH_ROW(3)odbc_fetch_row - Fetch a rowSYNOPSIS
bool odbc_fetch_row (resource $result_id, [int $row_number])
DESCRIPTION
Fetches a row of the data that was returned by odbc_do(3) or odbc_exec(3). After odbc_fetch_row(3) is called, the fields of that row can
be accessed with odbc_result(3).
PARAMETERS
o $result_id
- The result identifier.
o $row_number
- If $row_number is not specified, odbc_fetch_row(3) will try to fetch the next row in the result set. Calls to odbc_fetch_row(3)
with and without $row_number can be mixed. To step through the result more than once, you can call odbc_fetch_row(3) with
$row_number 1, and then continue doing odbc_fetch_row(3) without $row_number to review the result. If a driver doesn't support
fetching rows by number, the $row_number parameter is ignored.
RETURN VALUES
Returns TRUE if there was a row, FALSE otherwise.
PHP Documentation Group ODBC_FETCH_ROW(3)
Check Out this Related Man Page
MSSQL_DATA_SEEK(3)MSSQL_DATA_SEEK(3)mssql_data_seek - Moves internal row pointerSYNOPSIS
bool mssql_data_seek (resource $result_identifier, int $row_number)
DESCRIPTION mssql_data_seek(3) moves the internal row pointer of the MS SQL result associated with the specified result identifier to point to the
specified row number, first row being number 0. The next call to mssql_fetch_row(3) would return that row.
PARAMETERS
o $result_identifier
- The result resource that is being evaluated.
o $row_number
- The desired row number of the new result pointer.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
mssql_data_seek(3) example
<?php
// Connect to MSSQL and select the database
$link = mssql_connect('MANGOSQLEXPRESS', 'sa', 'phpfi');
mssql_select_db('php', $link);
// Select all people
$result = mssql_query('SELECT [name], [age] FROM [persons] WHERE [age] >= 13');
if (!$result) {
die('Query failed.');
}
// Select every 4th student in the results
for ($i = mssql_num_rows($result) - 1; $i % 4; $i++) {
if (!mssql_data_seek($result, $i)) {
continue;
}
// Fetch the row ...
}
// Free the query result
mssql_free_result($result);
?>
PHP Documentation Group MSSQL_DATA_SEEK(3)
Can anyone explain to me how to get the last two chars' from each row of Column (each row being variable in length) using awk, some of the lines will be blank, I'll be running a paste after awking. So I need to keep the blanks where they are..so I can paste back all columns in the correct order
... (9 Replies)
Hello folks,
I have data collected in every 3 hours. But, I would like to expand this to 1 hour interval by equally dividing with next row.
For example, I want to keep the first value 1987-01-01-00z 2.0, but following all record should be re-written as follow.
1987-01-01-03z 5.0 becomes... (11 Replies)
I am trying to take two files and add the numbers from each. There is a total of 5192 numbers in each file and I want to add them row by row... ie. first row of file 1 + first row of file 2 = first row of output. Eventually I will be summing 40401 of these files together but starting with 2 just... (21 Replies)
Hi guys,
Wish you all a very Happy New Year!!!.
Thanks in advance.
I want to read a file and merge the rows which have '\n' in it.
The rows could be > 50,000 bytes. The script should merge all the rows till the next row starts with word 'Type|'.
ex.... (24 Replies)
I have . dat file which contains data in a specific format:
0 3 892 921 342
1 3 921 342 543
2 4 817 562 718 765
3 3 819 562 717 761
i need to compare each field in a row with another field of the same column but different row and cont the... (8 Replies)
hi guys, today i'm stuck in a new problem.
the title explain more or less but a particular had been omitted. So i'm going to describe below the situation with an example.
I have different html files and each of them have a consecutive lines group inside that i want to extract.
example:
... (8 Replies)
Hello,
I want to add a new row to a file to insert data without deleting the previous data there.
Example:
file
a
b
c
d
Output
a
b
newtext
c (6 Replies)
Hi all,
I want to compute for the average of a file with null values (NaN) for each row. any help on how to do it. the sample file looks like this.
1.4 1.2 1.5 NaN 1.6
1.3 1.1 NaN 1.3 NaN
2.4 1.3 1.5 NaN 1.5
NaN 1.2 NaN 1.4 NaN
I need to do a row-wise averaging such that it will sum only... (14 Replies)
Hello,
How to sort each row in a document with numerical values and with more than one row. Example
Input data (file1.txt):
4 6 8 1 7
2 12 9 6 10
6 1 14 5 7
and I want the the output to look like this(file2.txt):
1 4 6 7 8
2 6 9 10 12
1 5 6 7 14
I've tried
sort -n file1.txt >... (12 Replies)
I would like to find the first matching row and continue to search from the matching row. if column3 equal to 1 in the row, find the next matching row based on the criteria below. column3 in the matching row equal to 0 and column2 equal to column2 in the matching row
test.csv - test data
... (7 Replies)
Hi there I am trying to figure out and understand what the syntax would be to egrep lines that have a word occur twice in a row. the two words obviously should have a space between them and also it has to be case sensitive which I believe grep is by deffault. the closest I have come is...
grep... (7 Replies)