Source for file Voistlus.php

Documentation is available at Voistlus.php

  1. <?php
  2. /**
  3.  * Model for handling queries with database table 'voistlus'.
  4.  * 
  5.  * @author Margus Sellin <margus@bitweb.ee>
  6.  * @copyright Copyright (C) 2011. All rights reserved. Margus Sellin
  7.  * @package Model
  8.  * @project olymp
  9.  * 
  10.  */
  11.     class Model_Voistlus extends Zend_Db_Table_Abstract {
  12.         /**
  13.          * Database table name
  14.          * @access protected
  15.          * @var string 
  16.          */
  17.         protected $_name = 'voistlus';
  18.         /**
  19.          * @ignore
  20.          */
  21.         public function fetchByDates()
  22.         {
  23.             $select $this->select();
  24.             $select->from($this)
  25.                     ->order('Kuupaev ASC');
  26.             return $this->fetchAll($select);
  27.         }
  28.         /**
  29.          * @ignore
  30.          */
  31.         public function fetchVoistlused()
  32.         {
  33.             $select $this->select();
  34.             $select->from(array('v' => 'voistlus')array('VoistluseID''VoistluseNimi'));
  35.             
  36.             return $this->fetchAll($select);
  37.         }
  38.         /**
  39.          * @ignore
  40.          */
  41.         public function fetchTulemustabelByID($ID)
  42.         {
  43.             $select $this->select();
  44.             $select->from(array('v' => 'voistlus')array('VoistluseID''tulemustabel'))
  45.                 ->where("VoistluseID = ?"$ID);
  46.             
  47.             return $this->fetchRow($select);
  48.         }
  49.         
  50.         
  51.         public function fetchVoistlusedDetailed()
  52.         {
  53.             $select $this->select();
  54.             $select->setIntegrityCheck(false)
  55.             $select->from(array('v' => 'voistlus')array('VoistluseID''VoistluseNimi''LisajaID''Ajatempel'))
  56.                 ->join(array('k' => 'kasutaja')'k.KasutajaID=v.LisajaID'array('Kasutajanimi'));
  57.             $select->order('Ajatempel DESC');
  58.             return $this->fetchAll($select);
  59.         }
  60.         
  61.     }
  62. ?>

Documentation generated on Mon, 20 Jun 2011 05:43:10 +0300 by phpDocumentor 1.4.1