Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
PHP: pg_lo_tell - Manual
[go: Go Back, main page]

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

search for in the

pg_lo_unlink" width="11" height="7"/> <pg_lo_seek
Last updated: Mon, 05 Feb 2007

view this page in

pg_lo_tell

(PHP 4 >= 4.2.0, PHP 5)

pg_lo_tell — ラージオブジェクトのカレントのシーク位置を返す

説明

int pg_lo_tell ( resource large_object )

pg_lo_tell() は、ラージオブジェクトのカレントの位置 (先頭からのオフセット)を返します。

ラージオブジェクトインターフェースは、トランザクションブロックの中で 使用する必要があります。

パラメータ

large_object

pg_lo_open() が返す PostgreSQL の ラージオブジェクト(LOB)リソース。

返り値

ラージオブジェクトの先頭からのカレントのシーク位置(バイト数)を返します。 エラーが発生した場合は、負の数を返します。

例 1812. pg_lo_tell() の例

<?php
   $doc_oid
= 189762345;
  
$database = pg_connect("dbname=jacarta");
  
pg_query($database, "begin");
  
$handle = pg_lo_open($database, $doc_oid, "r");
  
// 最初の 50000 バイトをスキップする
  
pg_lo_seek($handle, 50000, PGSQL_SEEK_SET);
  
// どれだけスキップしたのかを調べる
  
$offset = pg_lo_tell($handle);
   echo
"Seek position is: $offset";
  
pg_query($database, "commit");
?>

上の例の出力は以下となります。


Seek position is: 50000

    

参考

pg_lo_seek()



add a note add a note User Contributed Notes
pg_lo_tell
There are no user contributed notes for this page.

pg_lo_unlink" width="11" height="7"/> <pg_lo_seek
Last updated: Mon, 05 Feb 2007
 
 
show source | credits | sitemap | contact | advertising | mirror sites