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_seek - 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_tell" width="11" height="7"/> <pg_lo_read
Last updated: Mon, 05 Feb 2007

view this page in

pg_lo_seek

(PHP 4 >= 4.2.0, PHP 5)

pg_lo_seek — ラージオブジェクトの位置をシークする

説明

bool pg_lo_seek ( resource large_object, int offset [, int whence] )

pg_lo_seek() はラージオブジェクトリソースの位置を シークします。

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

パラメータ

large_object

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

offset

シークするバイト数。

whence

定数 PGSQL_SEEK_SET(オブジェクトの先頭からシークする)、 PGSQL_SEEK_CUR(カレントの位置からシークする)、 あるいは PGSQL_SEEK_END(オブジェクトの最後からシークする) の中のひとつ。

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

例 1811. pg_lo_seek() の例

<?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);
  
// 次の 10000 バイトを読み込む
  
$data = pg_lo_read($handle, 10000);
  
pg_query($database, "commit");
   echo
$data;
?>

参考

pg_lo_tell()



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

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