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

search for in the

インストール/設定> <dBase
[edit] Last updated: Fri, 10 Feb 2012

view this page in

導入

これらの関数は、dBase 形式 (dbf) のデータベースに保存されたレコードにアクセスすることを可能にします。

dBase ファイルは、固定長の単純なシーケンシャルファイルです。 レコードはファイルの終りに追加され、削除されたレコードは dbase_pack() がコールされるまで保持されます。

dBase フィールドの型として有効なものは以下のとおりです。

有効なフィールド型
フィールド dBase 型 フォーマット 補足情報
M Memo n/a この型は PHP ではサポートされていません。 このフィールドは無視されます。
D Date YYYYMMDD フィールドの最大長は 8 です。
N Number 数字 長さと精度(小数点以下の桁数)を指定する必要があります。
C String 文字列 長さを指定する必要があります。データを取得する際、指定した長さに 満たない文字列にはその右側に空白文字が付加されます。
L Boolean T あるいは YTRUEF あるいは NFALSE です。 読み書きは整数値(1 または 0)で行われます。
F Float 浮動小数点数値 この型のフィールドのサポートは PHP 5.2.0 で追加されました。

注意:

この拡張モジュールは » PECL レポジトリに移動 されており、以下のバージョン以降 PHP にバンドルされなくなっています。 PHP 5.3.0.

警告

これらの関数では、インデックスおよびメモフィールドのサポートは 行われません。ロックのサポートも行われません。ふたつの Web サーバ プロセスが同時に同じ dBase ファイルを修正しようとした場合、 データベースはほぼ確実に駄目になってしまうでしょう。

商用データベースとして dBase ファイルを使用しないことを推奨します。 本物の SQL サーバーを替わりに選んでください。通常は、» MySQL または »  Postgres が PHP で使用されています。dBase サポートの目的は、 Web データベースのデータのインポート・エクスポートを行うことです。 なぜなら、Windows の表計算ソフトや統合ソフトでこのフォーマットが 通常サポートされているからです。



add a note add a note User Contributed Notes 導入
andreas dot maul at bgr dot de 09-Sep-2010 04:49
dbase functions can be used to create/manipulate the attribute list in shape files (which consist actually of at least three different files: *.shp for geometries, *.shx for the shape index and *.dbf containing the attribute table for the geometries). This industrial standard is still very popular and frequently used due to short access times not only by commercial products but also by open source products like UMN mapserver.
oto dot brglez at agenda dot si 23-Feb-2009 03:25
If you have xls or ods file with data. You can open file in OpenOffice Calc and save the table as dbf (dBase file) and the use this extension to manipulate data.

Usualy this gives better results than just saving as XML. or CSV.

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