downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

ibase_fetch_object> <ibase_execute
[edit] Last updated: Fri, 25 May 2012

view this page in

ibase_fetch_assoc

(PHP 4 >= 4.3.0, PHP 5)

ibase_fetch_assocクエリの結果から、行を連想配列として取得する

説明

array ibase_fetch_assoc ( resource $result [, int $fetch_flag = 0 ] )

クエリの結果の行を連想配列で返します。

ibase_fetch_assoc() は、 result から結果を 1 行取得します。 同じフィールド名のカラムが 2 つ以上存在する場合、最後のカラムが 優先されます。同名のその他のカラムにアクセスするには、 ibase_fetch_row() を使用して数値添字を用いるか あるいはクエリ中でカラムに別名をつけます。

パラメータ

result

結果ハンドル。

fetch_flag

fetch_flag は、定数 IBASE_TEXT および IBASE_UNIXTIME を論理和で指定します。IBASE_TEXT を渡すと、BLOB ID のかわりに BLOB の内容自体を返します。IBASE_UNIXTIME を渡すと、日付/時刻の値を文字列ではなく Unix タイムスタンプで返します。

返り値

ibase_fetch_assoc() は、取得した行に対応する連想配列を返します。 続けてコールすると、結果セットの次の行を返し、 行がもうない場合には FALSE を返します。

参考



add a note add a note User Contributed Notes ibase_fetch_assoc
karasek ... ceskyserver - dot - cz 26-Apr-2005 12:37
Unlike mysql_fetch_assoc, all indexes of associative array are upper-case.

so, use
$row = ibase_fetch_assoc($result);

echo $row["INDEX"];
not
echo $row["index"];
sir_fred@ 13-Dec-2003 06:34
If your php is older than version 4.3.0, you can use the following:

$arr_record = get_object_vars(ibase_fetch_object($sql_result));

which is the same as: $arr_record = ibase_fetch_assoc($sql_result);

 
show source | credits | stats | sitemap | contact | advertising | mirror sites