Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

sybase_fetch_assoc(3) [php man page]

SYBASE_FETCH_ASSOC(3)													     SYBASE_FETCH_ASSOC(3)

sybase_fetch_assoc - Fetch a result row as an associative array

SYNOPSIS
array sybase_fetch_assoc (resource $result) DESCRIPTION
sybase_fetch_assoc(3) is a version of sybase_fetch_row(3) that uses column names instead of integers for indices in the result array. Col- umns from different tables with the same names are returned as name, name1, name2, ..., nameN. An important thing to note is that using sybase_fetch_assoc(3) is NOT significantly slower than using sybase_fetch_row(3), while it pro- vides a significant added value. PARAMETERS
o $result - RETURN VALUES
Returns an array that corresponds to the fetched row, or FALSE if there are no more rows. NOTES
Note This function is only available when using the CT library interface to Sybase, and not with the DB library. SEE ALSO
sybase_fetch_row(3), sybase_fetch_array(3), sybase_fetch_object(3). PHP Documentation Group SYBASE_FETCH_ASSOC(3)

Check Out this Related Man Page

SYBASE_FETCH_OBJECT(3)													    SYBASE_FETCH_OBJECT(3)

sybase_fetch_object - Fetch a row as an object

SYNOPSIS
object sybase_fetch_object (resource $result, [mixed $object]) DESCRIPTION
sybase_fetch_object(3) is similar to sybase_fetch_assoc(3), with one difference - an object is returned, instead of an array. Speed-wise, the function is identical to sybase_fetch_array(3), and almost as quick as sybase_fetch_row(3) (the difference is insignifi- cant). PARAMETERS
o $result - o $object - Use the second $object to specify the type of object you want to return. If this parameter is omitted, the object will be of type stdClass. RETURN VALUES
Returns an object with properties that correspond to the fetched row, or FALSE if there are no more rows. EXAMPLES
Example #1 sybase_fetch_object(3) return as Foo <?php class Foo { var $foo, $bar, $baz; } // {...] $qrh= sybase_query('SELECT foo, bar, baz FROM example'); $foo= sybase_fetch_object($qrh, 'Foo'); $bar= sybase_fetch_object($qrh, new Foo()); // {...] ?> SEE ALSO
sybase_fetch_array(3), sybase_fetch_row(3). PHP Documentation Group SYBASE_FETCH_OBJECT(3)
Man Page

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

multidimensional arrays

I have a file that's logically in the form of a multidimensional array with an unknown number of records in the file. The file looks like this: name1 data1 name2 data2 name3 data3 ... nameN dataN How do I load this file into an array for processing, while... (2 Replies)
Discussion started by: leslie02
2 Replies

2. Shell Programming and Scripting

iterate over array

I can not for the life of me figure out how to iterate over this array { 'name1' => { 'a' => . 'b' => }, 'name2' => { 'a' => . 'b' => } } I want a for loop to iterate through the first element (name1 and name2 in my example) but I can't figure it out. Help... (2 Replies)
Discussion started by: IMTheNachoMan
2 Replies

3. Shell Programming and Scripting

concatinating the array

i need to concatenate array like. eg: a = { a,b,c} b= { 1,2,3} result should be like below c={a1,b2,c3} can u help me out (2 Replies)
Discussion started by: mail2sant
2 Replies

4. Shell Programming and Scripting

How often a name comes up for a certain row

Hi, I have a file that contains multiple rows and I want to find how often a list of names come up for row #2 (note: all files are tab deliminted): So the file looks like this: 1212 RICK 9823 JOAN 1221 RICK 1254 JACK 1224 JACK So I have another file that contains the list of... (5 Replies)
Discussion started by: phil_heath
5 Replies

5. Shell Programming and Scripting

how to spilit a row into fields and store the field content to the array

consider this is a line A#B#C#D#E#F#G#H note the delimeter is # i want to cut or spilt in to fields using the delimeter # and to store in an array. like this array=A array=B array=C array=D array=E and the array content should be displayed. echo "${array}" echo "${array}"... (5 Replies)
Discussion started by: barani75
5 Replies

6. Shell Programming and Scripting

Joining Three Files

Hi guys, I have three files which needs to be joined to a single file. File 1: Col a, Col b, Col c File 2: Col 1a, Col 1b File 3: Col 2a, Col 2b Output: Col 1a, Col 2a, Col a, Col b, Col c. All the files are comma delimited. I need to join Col b with Col 1b and need to... (17 Replies)
Discussion started by: mac4rfree
17 Replies

7. Shell Programming and Scripting

Extracting a certain pattern..

Hi All, Suppose i have 4 coloumns in a excel sheet. Col A Col B Col C Col D 123 time1 abc 8 231 time2 xyz 6 324 time3 abc 4 456 time4 xyz 3 132 time5 abc 2 I want the data of coloum A... (3 Replies)
Discussion started by: ankitknit
3 Replies

8. Shell Programming and Scripting

Fetch Valid String

Hi All, How to fetch the particular row based on my search command. For example Source Column Column A Column B 001,56123456 002,57123456 003,123456 Expected Output: 003,123456 To get this output I tried below mentioned function grep '123456' filename.txt (4 Replies)
Discussion started by: suresh_target
4 Replies