text
stringlengths
1
254
output
stringlengths
2
255
Prev
(PHP 3 = 3.0.8, PHP 4)
dba_nextkey() returns the next key of the database specified by handle and advances the internal key pointer.
dba_nextkey() は、 handle が指すデータベースのキーを返し、内部ポインタを進めます。
dba_nextkey() returns the key or FALSE depending on whether it succeeds or fails, respectively.
handle は、 dba_open() により 返されたデータベースハンドルです。
Prev
dba_nextkey() は成功時にキーを、失敗した場合に FALSE を返します。
dba_list
dba_firstkey() も参照下さい。
It is important that all of your applications do this consistently.
(PHP 3 = 3.0.8, PHP 4)
When you are absolutly sure that you do not require database locking you can do so by using "-" instead of "l "or "d".
dba_open() は、 handler を用いて mode を指定し、 path へのデータベースインスタンスを確立します。
handler is the name of the handler which shall be used for accessing path.
path は、ファイルシステムの通常のパスです。
dba_open() returns a positive handle or FALSE, in the case the database was opened successfull or fails, respectively.
mode には、既存のデータベースにアクセスする 際に読み込みアクセス用に "r"、読込み/書き込みアクセス用に"w"を、 読み込み/書き込みアクセスおよび存在しない場合にデータベースの作成をする ために"c"を、作成、上書き、読込み/書き込みアクセス用に "n" を指定 します。
This is important to know since in such cases locking is simply ignored on the resource and other solutions have to be found.
handler は、 path を アクセスするために使用するハンドルの名前です。 dba_open() に指定した全てのオプションパラメータを 渡し、そのオプションの機能を用いることができます。
In PHP versions before PHP 4.3.0 you must use semaphores to guard against simultanious database access for any database handler with the exception of GDBM.
dba_open() は、オープンに成功した場合に正の ハンドラID、失敗した場合に FALSE を返します。
See also: dba_popen() dba_close()
dba_popen() 、 dba_close() も参照下さい。
Prev
(PHP 3 = 3.0.8, PHP 4)
(PHP 3 = 3.0.8, PHP 4)
dba_optimize() は、 handle により指定されたデータベースを最適化します。
handle is a database handle returned by dba_open().
handle は、 dba_open() により 返されたデータベースハンドルです。
See also: dba_sync()
dba_optimize() は、最適化に成功した場合に TRUE, 失敗した場合に FALSE を返します。
Home
dba_sync() も参照下さい。
Prev
(PHP 3 = 3.0.8, PHP 4)
dba_popen() establishes a persistent database instance for path with mode using handler.
dba_popen() は、 handler を用いて mode で path への持続的データベースインスタンスを確立します。
path is commonly a regular path in your filesystem.
path は、通常のファイルシステムのパスです。
handler is the name of the handler which shall be used for accessing path.
mode には、既存のデータベースにアクセスする 際に読み込みアクセス用に "r"、読込み/書き込みアクセス用に"w"を、 読み込み/書き込みアクセスおよび存在しない場合にデータベースの作成をする ために"c"を、作成、上書き、読込み/書き込みアクセス用に "n" を指定 します。
dba_popen() returns a positive handle or FALSE, in the case the open is successful or fails, respectively.
handler は、 path を アクセスするために使用するハンドルの名前です。 dba_popen() に指定した全てのオプションパラメータを 渡し、そのオプションの機能を用いることができます。
Prev
dba_popen() は、オープンに成功した場合に正の ハンドラID、失敗した場合に FALSE を返します。
dba_optimize
dba_open() 、 dba_close() も参照下さい。
Prev
(PHP 3 = 3.0.8, PHP 4)
dba_replace() replaces or inserts the entry described with key and value into the database specified by handle.
dba_replace() は、 handle で 指定したデータベースに key および value で記述されるエントリを置換または挿入 します。
value is the value to be inserted.
key は挿入するエントリのキーです。
handle is a database handle returned by dba_open().
value は挿入する値です。
dba_replace() returns TRUE or FALSE, depending on whether it succeeds of fails, respectively.
handle は、 dba_open() により 返されたデータベースハンドルです。
Prev
dba_replace() は成功した場合に TRUE ,失敗した場合に FALSE を返します。
dba_popen
dba_exists() dba_delete() dba_fetch() dba_insert() も参照下さい。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
If the number of items in the supplied record isn 't equal to the number of fields in the database, the operation will fail and FALSE will be returned.
record のデータをデータベースに追加します。 指定したレコード中の項目数が、データベース中のフィールド数と等し くない場合、処理は失敗し、 FALSE が返されます。
Prev
(PHP 3, PHP 4)
Closes the database associated with dbase_identifier.
dbase_identifier が指すデータベースを閉じま す。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Each field consists of a name, a character indicating the field type, a length, and a precision.
fields パラメータは、配列の配列です。各配 列は、データベースにおける一つのフィールドのフォーマットを記述し ます。各フィールドは、名前、フィールド型、長さ、精度を示す文字か ら構成されます。
Boolean.
利用可能なフィールド型は次のようになります。
Memo. (Note that these aren't supported by PHP.) These do not have a length or precision.
論理値。長さも精度もありません。
These do not have a length or precision.
メモ。(PHP ではサポートされないことに注意して下さい。) 長さも精度もありません。
These have both a length and a precision (the number of digits after the decimal point).
日付(Date) (YYYYMMDD という形式で保持されます)。 長さも精度もありません。
If the database is successfully created, a dbase_identifier is returned, otherwise FALSE is returned.
番号(Number)。長さおよび精度(小数点以下の桁数)を有します。
Creating a dBase database file
文字列。
Prev
データベースの作成に成功した場合、dbase ID が返されます。失敗した 場合は、 FALSE が返されます。
dbase_delete_record
例 1dBaseデータベースファイルを作成する
(PHP 3, PHP 4)
(PHP 3, PHP 4)
To actually remove the record from the database, you must also call dbase_pack().
データベースから削除したいレコード record をマークします。実際に削除を行うには、 dbase_pack() をコールする必要があります。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
The array is indexed starting at 0, and includes an associative member named 'deleted' which is set to 1 if the record has been marked for deletion (see dbase_delete_record().
record からのデータが配列に返されます。配 列の添字は 0から始まり、連想配列のメンバー 'deleted' を含んでいま す。これには、そのレコードに削除指定が行われている場合に 1 がセッ トされます。( dbase_delete_record() も参照下さ い。)
Dates are left as strings
各フィールドは、適当な PHP 型に変換されます。
Prev
日付は、文字列のままとなります。
dbase_get_record_with_names
整数は、オーバーフロー( 32ビット)を起こす可能性がある整数が文 字列として返します。
(PHP 3 = 3.0.4, PHP 4)
(PHP 3 = 3.0.4, PHP 4)
The array also includes an associative member named 'deleted' which is set to 1 if the record has been marked for deletion (see dbase_delete_record()).
record からデータを連想配列として返します。 配列は、レコードに削除のマークが付けられている場合は、連想配列に メンバー'deleted'が付加され、その値は1となります。 (dbase_delete_record() を参照下さい。)
Dates are left as strings
各フィールドは以下の例外を除き表示適当なPHP型に変換されます。
Prev
日付は文字列のままとなります。
dbase_delete_record
オーバーフローを発生するような整数( 32ビット)は、文字列として 返されます。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Field numbers are between 0 and dbase_numfields( $db)-1, while record numbers are between 1 and dbase_numrecords($db).
指定したデータベースにおけるフィールド(カラム)数を返します。フィー ルド番号は 0 から dbase_numfields($db)-1 まで、レコード番号は 1 から dbase_numrecords($db) までです。
$rec = dbase_get_record( $db, $recno); $nf = dbase_numfields($db); for ($i=0; $i $nf; $i++) {print $rec[$i]. "br \n";}
例 1 dbase_numfields() の使用法
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Record numbers are between 1 and dbase_numrecords( $db), while field numbers are between 0 and dbase_numfields($db )-1.
指定したデータベースにレコード(行)数を返します。レコード番号は 1 から dbase_numrecords($db) まで、フィールド番号は 0 から dbase_numfields($db)-1 までです。
Prev
(PHP 3, PHP 4)
The flags correspond to those for the open() system call. (Typically 0 means read-only, 1 means write-only, and 2 means read and write.)
フラグは、open() システムコールにおけるフラグに対応します。 (通常、0 は読込のみ可、1 は書込のみ可、2 は読み書きを意味します)
Note:
オープンされたデータベースの dbase ID を返します。 データベースをオープンできなかった場合は、 FALSE を返します。
Prev
注意 セーフモード が有効の場合、PHP は操作を行うファイル/ディレクトリが実行するスクリプトと同じUIDを有しているかどうかを確認します。
Prev
(PHP 3, PHP 4)
Packs the specified database (permanently deleting all records marked for deletion using dbase_delete_record()).
指定されたデータベースをパックします。 (dbase_delete_record() を用いて削除指定を行っ た全てのレコードの削除を実際に行います。)
(PHP 3 = 3.0.11, PHP 4)
(PHP 3 = 3.0.11, PHP 4)
If the number of items in the supplied record is not equal to the number of fields in the database, the operation will fail and FALSE will be returned.
データベースのレコード record_number が指す データを record のデータで置換します。指定し たレコードの項目数がデータベースのフィールド数に等しくない場合、 操作は失敗し、 FALSE が返されます。
Prev
dbase_record_number は1からデータベースの レコード数までの範囲の整数となります。 (dbase_numrecords() により返されます)
Prev
(PHP 3 = 3.0.8, PHP 4)
dba_sync() synchronizes the database specified by handle.
dba_sync() は、 handle で 指定したデータベースを同期します。サポートされる場合には、おそらくディスク への物理的アクセスへのきっかけとなることでしょう。
handle is a database handle returned by dba_open().
handle は、 dba_open() により 返されたデータベースハンドルです。
See also: dba_optimize()
dba_sync() は同期が成功した場合に TRUE 、失敗した場合に FALSE を返します。
Date and Time functions
dba_optimize() も参照下さい。
[marcus@zaphod marcus]$ php -r'echo dblist(); 'This is GDBM version 1.8.0, as of May 19, 1999.
(PHP 3, PHP 4)
Prev
(PHP 3, PHP 4)
Unlocks and closes the specified database.
指定したデータベースをアンロックして閉じます。
Prev
(PHP 3, PHP 4)
Deletes the value for key in the database.
データベース中の、指定されたキーに対応する値を削除します。
Prev
データベース中にキーが存在しない場合は FALSE を返します。
Prev
(PHP 3, PHP 4)
Returns TRUE if there is a value associated with the key.
キー key が指す値が存在すれば TRUE を返します。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Prev
キー key が指す値を返します。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Note that no particular order is guaranteed since the database may be built using a hash-table, which doesn 't guarantee any ordering.
データベースから最初のキーを取り出します。データベースは順序を 保証しないハッシュテーブルを使って構築されている可能性があるので、 返される値の順序は保証されないことに注意してください。
Prev
(PHP 3, PHP 4)
Adds the value to the database with the specified key.
データベースに、指定したキー(key)に対応する値を追加します。
Prev
データベースがリードオンリーでオープンされていた場合は -1 を返し、 挿入が成功すれば 0 を返します。指定されたキーが存在する場合は 1 を 返します(値を置き換えるには dbmreplace() を 使って下さい)。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
By calling dbmfirstkey() followed by successive calls to dbmnextkey() it is possible to visit every key / value pair in the dbm database.
key の次のキーを返します。まず dbmfirstkey() をコールし、引き続き dbmnextkey () をコールすれば、dbm データベース上のすべてのキー/値 の組み合わせを取り出すことができます。たとえば、以下のように コーディングします。
$key = dbmfirstkey ($dbm_id); while ($key) {echo "$key = ". dbmfetch ($dbm_id, $key). "\n"; $key = dbmnextkey ($dbm_id, $key);}
例 1 ある dbm データベース上のすべてのキー/値の組み合わせを取り出します。
(PHP 3, PHP 4)
(PHP 3, PHP 4)
Returns an identifier to be passed to the other DBM functions on success, or FALSE on failure.
第1引数はオープンされるDBMファイルのフルパス名で、第2引数は ファイルオープンモードです。これは "r", "n", "c", "w" のうちのいずれかで、 順に読み込み用、新規ファイル(読み書き可能。既に存在する同名のファイルを 上書きする可能性があります。)、作成(読み書き可能。既に存在する同名の ファイルを上書きしません)および読み書き用を示します。
Note that PHP does its own file locking in addition to any file locking that may be done by the DBM library itself.
成功すると他のDBM関数に渡すIDを返し、失敗すると FALSE を返します。
Prev
注意 セーフモード が有効の場合、PHP は操作を行うファイル/ディレクトリが実行するスクリプトと同じUIDを有しているかどうかを確認します。
Prev
(PHP 3, PHP 4)
Replaces the value for the specified key in the database.
データベース中の、指定されたキーに対応する値を置き換えます。