PHP kézikönyv
Előző |  | Következő

# XXV. dBase Functions

# Bevezetés

These functions allow you to access records stored in dBase-format (dbf) databases.

dBase files are simple sequential files of fixed length records. Records are appended to the end of the file and delete records are kept until you call dbase_pack().

The types of dBase fields available are:

Táblázat 1. Available types of fields

Field | dBase Type | Format | Additional informations
--- | --- | --- | ---
M | Memo | n/a | This type is not supported by PHP, such field will be ignored
D | Date | YYYYMMDD | The field length is limited to 8
N | Number | A number | You must declare a length and a precision (the number of digits after the decimal point)
C | String | A string | You must declare a length. When retrieving data, the string will be right-padded with spaces to fit the declared length.
L | Boolean | T or Y for `TRUE`, F or N for `FALSE` | Stored and returned as an integer (1 or 0)

Figyelem
There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent webserver processes modifying the same dBase file will very likely ruin your database. We recommend that you do not use dBase files as your production database. Choose any real SQL server instead; MySQL or Postgres are common choices with PHP. dBase support is here to allow you to import and export data to and from your web database, because the file format is commonly understood by Windows spreadsheets and organizers.

# Telepítés

In order to enable the bundled dbase library and to use these functions, you must compile PHP with the --enable-dbase option.

# Futásidejű beállítások

Ez a kiterjesztés semmilyen konfigurációs beállításokat nem definiál a `php.ini` állományban.

# Erőforrás típusok

Ez a kiterjesztés semmilyen erőforrás típust nem definiál.

# Példák

Many examples in this reference require a dBase database. We will use `/tmp/test.dbf` that will be created in the example of dbase_create().

# Előre definiált állandók

Ez a kiterjesztés semmilyen konstans értéket nem definiál.

Előző | Tartalom | Következő
dba_sync | Fel | dbase_add_record