Nauka programowania php

Prosty kurs dla amatorów

dBase Functions

XXV. dBase Functions

Wstęp

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:

Tabela 1. Available types of fields

FielddBase TypeFormatAdditional information
MMemon/aThis type is not supported by PHP, such field will be ignored
DDateYYYYMMDDThe field length is limited to 8
NNumberA number You must declare a length and a precision (the number of digits after the decimal point)
CStringA stringYou must declare a length. When retrieving data, the string will be right-padded with spaces to fit the declared length.
LBooleanT or Y for TRUE, F or N for FALSEStored and returned as an integer (1 or 0)
FFloatA float numberSupport for this type of field was added in PHP 5.2.0

Ostrzeżenie

There is no support for indexes or memo fields. There is no support for locking, too. Two concurrent web server 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.

Instalacja

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

Konfiguracja uruchomieniowa

To rozszerzenie nie definiuje posiada żadnych dyrektyw konfiguracyjnych w pliku php.ini.

Typy zasobów

To rozszerzenie nie posiada żadnych rodzajów zasobów.

Przykłady

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().

Stałe predefiniowane

To rozszerzenie nie posiada żadnych stałych.

Spis treści
dbase_add_record -- Adds a record to a database
dbase_close -- Closes a database
dbase_create -- Creates a database
dbase_delete_record -- Deletes a record from a database
dbase_get_header_info -- Gets the header info of a database
dbase_get_record_with_names --  Gets a record from a database as an associative array
dbase_get_record --  Gets a record from a database as an indexed array
dbase_numfields -- Gets the number of fields of a database
dbase_numrecords -- Gets the number of records in a database
dbase_open -- Opens a database
dbase_pack -- Packs a database
dbase_replace_record -- Replaces a record in a database


Newsy:

Nowości z listy dyskusyjnej

drugsxxx: Test (C/C++)
Mam taki test i co prawa ju¿ go pisa³em ale nie wiem jakie s± dobre odpowiedzi moze kto¶ mi pomo¿e??

http://www.kolejland.rail.pl/iz/Forum%20-%...wania/jipp2.jpg

Moje odpowiedzi to:

1. a
2. abc
3. bc
4. d
5. ad
morphix: Programik do wy¶wietlania informacji na pulpicie (Windows Programming)
Plisss bardzo potrzebny nam jest taki program!!!
fressbie: [C++, Assembler] Zlece napisanie lub modyfikacje (Oferujê pracê)
Witam,

Jak w temacie zlecê napisanie od nowa lub zmodyfikowanie istniej±cej ju¿ wersji programu do obliczania sum md5. Zainteresowanych proszê o kontakt.
bear007: Polska strona rozwa¿a przej¶cie na Open Source (Server-Side)
Autor strony Polishwords rozwa¿a przej¶cie na model Open Source. Aby u³atwiæ sobie decyzjê umie¶ci³ ankietê, w której mo¿na zag³osowaæ za albo przeciwko przej¶ciu na Open Source. Pomó¿my autorowi!

Strona Polishwords jest przeznaczona dla programistów i ogó³ informatyków. Zawiera filmy instrukta¿owe z programowania i zarz±dzania baz± danych. Autor rozwa¿a obecnie przej¶cie na model Open Source i opublikowanie kodu strony. Chcia³by przez to osi±gn±æ szybszy rozwój strony i zaanga¿owanie wiêkszej liczby programistów PHP.

W umieszczonej ankiecie mo¿na zag³osowaæ czy autor powinien przej¶æ na model Open Source. Pomó¿ podj±æ dobr± decyzjê autorowi.

Wiêcej na: http://polishwords.com.pl/blog/2008/polishwords-open-source/
webcoder: Program typu klient-serwer (Delphi/Pascal)
Witam pisze program klient-serwer. Próba nr.1:
Skorzysta³em z najprostszech komponentów tego rodzaju czyli ClientSocket i ServerSocket. Posutawialem porty oraz ip w kliencie.
Je¿eli wpsize ip localhosta (127.0.0.1) to klient polaczy sie z serwerem. Jezeli wpisze IP wewnetrzne tez sie polaczy. Ale jezeli wpisze juz ip zewnetrzne to wyskauje blad asynohrous socket error 10061.
Podejscie nr.2
Zmieni³em komponenty na Indy. Wszystko zosta³o odpowiednio skofigurowane. Wiec sytuacja jest identyczna jak powyzej wszystko dziala na ip wewnetrznym i na localhoscie a na zewnetrznym juz. Prosze o pomoc w tej sprawie.

Mo¿e jeszcze dodam, ¿e jest w sieci typu WLan.
Pozdro
Prosze o jak najszybsza odpowiedz

Jak nie znasz jezyka C++ i wskaznikow i programowania obiektowego, to sobie daruj programy okienkowe. Jezeli znasz to wszystko co wymienilem, to w sumie powinienes tez wiedziec jak, badz przy pomocy czego da sie tworzyc programy okienkowe piszac w C++

Kurs

Kurs powstał w celu nauki podstawowych zagadnień z dziedziny php.


Losowe tagi:

commandline
dbase
filter
lzf
rar