SYBASE_FETCH_ASSOC(3)SYBASE_FETCH_ASSOC(3)sybase_fetch_assoc - Fetch a result row as an associative arraySYNOPSIS
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 objectSYNOPSIS
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)
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)
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)
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)
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)
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)
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)
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)