Deutsch English
About tdbengine
First Steps
Runtime Switches
Text files
System functions
Database functions
Index functions
Full-text Indexing
Memos and BLOBs
Semaphore concept
Error codes
Hints for PHP developers
Basic Course
Function reference
Bug Reporting
Support request
Home    Overview    Search    Impressum    Contact    Members
Hints for PHP - developers
PHP developers need some rethinking if they want to use tdbengine:

Tdbengine programs are no parsed HTML - pages, but real CGI-applications which need to create a website themselves. Therefore they can send simple WRITE-instructions directly to the client system or (even better!) use a template (HTML page with placeholders), replace the placeholders and send the resulting page to the client (browser).

That's why it is not necessary to write a program for every new query or action. The tdbengine prefers to have all the functionality - for example a press-release system - in one program.The single functions may be delivered by GET or POST-instructions and are evaluated by a single dispatcher. Thats why the main function in many programs just looks like this:

VAR command:=GetQueryString('command')
  IF command='search' THEN ...
  ELSIF command='login' THEN ...
  ELSIF command='logout' THEN ...
  ELSIF ...
  ELSE  ...  // Startpage

The integrated database works much more directly with the tables than the connection to an external SQL-database. This might look a bit strange to you, maybe even more strange than the Syntax of EASY that resembles Pascal.

Here's a little code fragment which sends a query ($PLZ like "8????") to an address-table and puts out the found records.

VAR db : INTEGER = OpenDB('database/adressen.dat')  //Tabelle (zum Lesen) öffnen
VAR nn : INTEGER = FindAndMark(db,'$PLZ LIKE "8????"') // Suchen IF nn=0 THEN  //Kein Treffer
  CGIWriteLn('Leider nichts gefunden')
ELSE  // Die Tabellenzeilen der gefundenen Datensätze sind IN der Markierungsliste
  CGIWriteLn(Str(nn)+' Datensätze gefunden.') // Erst einmal eine Meldung
  VAR x : INTEGER = FirstMark(db) // An den Anfang der Markierungsliste
  WHILE x>0 DO // Die gesamte Markierungsliste durchgehen
    ReadRec(db,x) // Zeile holen
    CGIWriteLn(GetField(db,'Name')) // Spalten ausgeben
    x:=NextMark(db,x)   END

The direct-table access is much more performant.

tdbengine Anwendungen im Web:

Open-Source Web CMS

Open-Source Bug-Tracking

Free wiki hosting

Open-Source Wiki-System

Kostenloses Foren-Hosting

Diät mit tdbengine 8-)

tdbengine chat

   Copyright © 2003-2004 tdb Software Service GmbH
   Alle rechte vorbehalten. / All rights reserved
   Last changed: 06.05.2004

Programmers Heaven - Where programmers go!