Source for file Kool.php
Documentation is available at Kool.php
* Model for handling queries with database table 'kool'.
* @author Margus Sellin <margus@bitweb.ee>
* @copyright Copyright (C) 2011. All rights reserved. Margus Sellin
* Database query that fetches a row from 'kool' table where
* column 'nimi' equals the given parameter.
* @param string $name School name
* @return mixed $result Query resultset
$select =
$this->select();
->where('nimi = ?', $name);
$result =
$this->fetchRow($select);
public function fetchAllJSON()
$select =
$this->select();
$select->from(array('k' =>
'kool'), array('id', 'nimi AS text'));
return $this->fetchAll($select);
public function fetchByID($id)
$select =
$this->select();
$select->from(array('k' =>
'kool'), array('id', 'nimi'))
return $this->fetchRow($select);
Documentation generated on Mon, 20 Jun 2011 05:43:06 +0300 by phpDocumentor 1.4.1