pg_field_is_nullとは? わかりやすく解説

Weblio 辞書 > コンピュータ > PHP関数リファレンス > pg_field_is_nullの意味・解説 

pg_field_is_null

(PHP 4 >= 4.2.0, PHP 5)
pg_field_is_null — フィールドが SQL の NULL かどうか調べる

説明

int pg_field_is_null ( resource result, int row, mixed field )
int pg_field_is_null ( resource result, mixed field )
pg_field_is_null() は、PostgreSQL 結果リソースの フィールドが SQL の NULL であるかどうかを調べます。
注意: この関数は、以前は pg_fieldisnull() と呼ばれていました。

パラメータ

result
pg_query(), pg_query_params() あるいは pg_execute() から返される PostgreSQL の クエリ結果リソース。
row
取得する結果の行番号。行番号は 0 から始まります。指定しなかった場合は カレントの行を取得します。
field
(0 から始まる)フィールド番号を表す数値、 あるいはフィールド名を表す文字列。

返り値

指定した行のフィールドが SQL の NULL だった場合に 1、そうでない場合に 0 を返します。 もし範囲外の行を指定したりその他のエラーが発生したりした場合には FALSE を返します。

例 1787. pg_field_is_null() の例
<?php
  $dbconn = pg_connect("dbname=publisher") or die ("Could not connect");
  $res = pg_query($dbconn, "select * from authors where author = 'Orwell'");
  if ($res) {
     if (pg_field_is_null($res, 0, "year") == 1) {
         echo "The value of the field year is null.\n";
     }
     if (pg_field_is_null($res, 0, "year") == 0) {
         echo "The value of the field year is not null.\n";
   }
 }
?>




このページでは「PHP関数リファレンス」からpg_field_is_nullを検索した結果を表示しています。
Weblioに収録されているすべての辞書からpg_field_is_nullを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からpg_field_is_null を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「pg_field_is_null」の関連用語

pg_field_is_nullのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



pg_field_is_nullのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
PHP Documentation GroupPHP Documentation Group
Copyright © 1997 - 2025 by the PHP Documentation Group.

©2025 GRAS Group, Inc.RSS