Pobieranie danych
Aby pobrać dane należy stworzyć obiekt dla danej tabeli, po czym an stworzynym obiekcie wywołąć jedną z metod standardowych lub z metod dostępnych dla danej tabeli.Lista podstawowych metod jakie można wykorzystać
- select($where = null, $order = null, $what = '*',$limit = null, $groupby = null, $bindValues = array() )
- insert(array $data = array())
- update($column, $value, $where, $bindValues = array() )
- updateRow($data, $where, $bindValues = array() )
- deleteRows($where, $bindValues = array() )
- delete($id)
- fetchRow($where = null, $order = null, $what = '*', $bindValues = array(), $fetchType = PDO::FETCH_OBJ)
- fetchAll($where = null, $order = null, $what = '*', $limit = null, $groupby = null, $bindValues = array(),$fetchType = PDO::FETCH_OBJ)
- fetchTextSearch($searchText,array $columns, $where = null, $order = null, $what = '*', $limit = null, $groupby = null, $bindValues = array() )
- fetchCount($where = null, $bindValues = array() )
- fetchCountGroup($groupBy,$where = null,$order = null,$what = '*', $limit = null, $bindValues = array() )
- fetchSum($sumColumn,$where = null,$order = null,$what = '*', $limit = null, $bindValues = array() )
- fetchGroup($groupBy, $where = null, $order = null, $what = '*', $limit = null, $bindValues = array())
- set($id,$column,$value)
- get($id,$column)
$pagesDB = new pagesDB(); $pages = $pagesDB->fetchAll("id>10");
Tabele
Każda tabela ma swój własny plik z metodami tożsamymi tylko dla niej oraz ma także dostępne metody które są dostępne dla wszystkich tabel korzystających z silnika bazy danych.Lista tabel wyglada następująco:
- banners
- bannersareas
- cache
- calendar
- calendarEvents
- comments
- config
- contact
- contactgroups
- cronlog
- firewall
- files
- forumGroups
- forumPosts
- forumTopics
- forumReadedLog
- forums
- images
- mailings
- mailingtemplates
- messages
- notes
- notify
- pages
- pagesbackups
- pollanswers
- pollAnswers
- pollQuestions
- polls
- rates
- redirect
- session
- systemStatus
- themes
- users
- usertypes
- widgets
Do edycji i przeglądania tabel w przypadku bazy danych SQLite polecamy roszeżenie do programu FireFox https://addons.mozilla.org/pl/firefox/addon/sqlite-manager/