Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

fbsql_fetch_object(3) [php man page]

FBSQL_FETCH_OBJECT(3)							 1						     FBSQL_FETCH_OBJECT(3)

fbsql_fetch_object - Fetch a result row as an object

SYNOPSIS
object fbsql_fetch_object (resource $result) DESCRIPTION
fbsql_fetch_object(3) is similar to fbsql_fetch_array(3), with one difference - an object is returned, instead of an array. Indirectly, that means that you can only access the data by the field names, and not by their offsets (numbers are illegal property names). Speed-wise, the function is identical to fbsql_fetch_array(3), and almost as quick as fbsql_fetch_row(3) (the difference is insignifi- cant). PARAMETERS
o $ result -A result identifier returned by fbsql_query(3) or fbsql_db_query(3). RETURN VALUES
Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. EXAMPLES
Example #1 fbsql_fetch_object(3) example <?php fbsql_connect($host, $user, $password); $result = fbsql_db_query("database", "select * from table"); while ($row = fbsql_fetch_object($result)) { echo $row->user_id; echo $row->fullname; } fbsql_free_result($result); ?> SEE ALSO
fbsql_fetch_array(3), fbsql_fetch_row(3), fbsql_fetch_assoc(3). PHP Documentation Group FBSQL_FETCH_OBJECT(3)

Check Out this Related Man Page

INGRES_FETCH_OBJECT(3)							 1						    INGRES_FETCH_OBJECT(3)

ingres_fetch_object - Fetch a row of result into an object

SYNOPSIS
object ingres_fetch_object (resource $result, [int $result_type]) DESCRIPTION
This function is similar to ingres_fetch_array(3), with one difference - an object is returned instead of an array. Indirectly, this means that you can access the data only by the field names and not by their offsets (numbers are illegal property names). With regard to speed, the function is identical to ingres_fetch_array(3), and almost as quick as ingres_fetch_row(3) (the difference is insignificant). Note Related Configurations See also the ingres.fetch_buffer_size and ingres.utf8 directives in Runtime Configuration. PARAMETERS
o $link - The query result identifier o $result_type - (Optional argument.) $result_type is a constant and can take the following values: INGRES_ASSOC, INGRES_NUM, and INGRES_BOTH. RETURN VALUES
Returns an object that corresponds to the fetched row, or FALSE if there are no more rows EXAMPLES
Example #1 Fetch a row into an object <?php $link = ingres_connect($database, $user, $password); $result = ingres_query($link, "select * from table"); while ($row = ingres_fetch_object($result)) { echo $row->user_id; echo $row->fullname; } ?> SEE ALSO
ingres_query(3), ingres_num_fields(3), ingres_field_name(3), ingres_fetch_array(3), ingres_fetch_assoc(3), ingres_fetch_row(3). PHP Documentation Group INGRES_FETCH_OBJECT(3)
Man Page

11 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

unix

Hi friends, I have on data file containing 3 coloums........... like this. **** ***** ***** *** ***** ***** *** ***** ***** 12.36 13,27 22.16 **** ***** ***** **** ***** ***** **** ***** ***** **** ***** ***** 12.35 32.46 34.56 now from... (9 Replies)
Discussion started by: rajan_ka1
9 Replies

2. Shell Programming and Scripting

summing numbers in files

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)
Discussion started by: pattywac
21 Replies

3. Shell Programming and Scripting

reversing a line

Hi, I could not find this anywhere and I am wondering if someone knows a quick way of doing this. So heres the problem... I have a row that looks like this (an example): 5 4 3 2 1 What I want to do is reverse it so it looks like this: 1 2 3 4 5 Does anyone know the simple unix... (7 Replies)
Discussion started by: kylle345
7 Replies

4. Shell Programming and Scripting

File splitter by nth row

I need to split a file into n separate files of about the same size. The way the file will be split is at every nth row, starting with the first row, that row will be cut and copied to it's corresponding new file so that each file has unique records. Any 'leftovers' will go into the last file. e.g.... (4 Replies)
Discussion started by: sitney
4 Replies

5. Shell Programming and Scripting

awk command : row by row merging of two files

I want to write a scrpit to merge files row wise (actually concatinating) main.txt X Y Z file 1 A B C file 2 1 2 3 now i want the script to check if the file1 is empty or not, if empty then make it like A B C 1 2 3 again to check if second file is empty if not do as done... (0 Replies)
Discussion started by: shashi792
0 Replies

6. Shell Programming and Scripting

select always the first row

Hi, I have an output like this: #CMD Output: user1 user2 user3 user4 How can I select ONLY the first row? Thanks (4 Replies)
Discussion started by: iga3725
4 Replies

7. Shell Programming and Scripting

row Comparison

(5 Replies)
Discussion started by: number10
5 Replies

8. Shell Programming and Scripting

Summing data on N. row of each line

Hi friends, lets assume that I have lines of data as follows rico 12 bct 58 pot 65 vft 41 dek 45 kbt 13 her 35 ubr 14 . . . . . . . . . . . . I want to calculate the sum of the numbers at the 2. row of each... (6 Replies)
Discussion started by: rpf
6 Replies

9. Shell Programming and Scripting

calculating row-wise standard deviation using awk

Hi, I have a file containing 100,000 rows-by-120 columns and I need to compute for the standard deviation for each row. Any idea on how to calculate row-wise standard deviation using awk? My sample data looks like this: input data: 23 35 12 25 16 17 18 19 29 12 12 26 15 14 15 23 12 12... (2 Replies)
Discussion started by: ida1215
2 Replies

10. Shell Programming and Scripting

In php, Moving a new row to another table and deleting old row

Hi, I already succeed moving a new row to another table if the field from new row doesn't have the first word that I categorized (like: IRC blablabla, PTM blablabla, ADM blablabla, BS blablabla). But it can't delete the old row. Please help me with the script. my php script: INSERT INTO... (2 Replies)
Discussion started by: jazzyzha
2 Replies

11. UNIX for Dummies Questions & Answers

Putting file name inside file

I have a bunch of files with unique names. Inside each file are either 1 or more than 1 rows. I would like the name of the file to appear inside the file itself, once per row (except for the first row which is a header). For example: ls dog.1 cat.1 goat.1 tree.1 cat dog.1 ... (4 Replies)
Discussion started by: verse123
4 Replies