POT
POT
POT
Main menu

Download

Forum

SVN

Prev Next

Database

Here you will find information about operations on OTServ database.

Table of Contents

OTServ database

OTServ stores all user-related stuff (like accounts, players, guilds etc.) in SQL database. This is probably basic usage for POT. Connection to database is handled within POT instance. At first you have to connect.

PDO handle

POT uses PDO as it's database layer core. It is possible to get handle instance by calling getDBHandle() on POT instance. This method returns PDO connection extended by POT-specific driver routines like preparing identifier names.


Abstraction classes

Main purpose of POT is to provide API abstraction for resources from OTServ. Nearly all essential data from database has abstraction class which provides programming interface for PHP scripts which usualy hide many uncomfortable operations.

For each kind of resources like players, accounts, guilds etc. there are two kind of classes - single row representation that contains many management routines; and list class which allows you to group, filter and sort more then one records. Everything is done using native PHP objects without need to use any additional technology like XML or even SQL.

Prev Up Next
PHP 5.0 POT DAO objects