Source for file Osaleja.php

Documentation is available at Osaleja.php

  1. <?php
  2. /**
  3.  * Model for handling queries with database table 'osaleja'.
  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_Osaleja extends Zend_Db_Table_Abstract {
  12.         /**
  13.          * Database table name
  14.          * @access protected
  15.          * @var string 
  16.          */
  17.         protected $_name = 'osaleja';
  18.  
  19.         /**
  20.          * Query fetchByName.
  21.          * Database query that fetches a row from 'osaleja' table where
  22.          * column 'nimi' equals the given parameter.
  23.          * 
  24.          * @access public
  25.          * @param string $name Participant name
  26.          * @return mixed $result Query resultset
  27.          */
  28.         public function fetchByName($name)
  29.         {
  30.             $select $this->select();
  31.             $select->from($this)
  32.                     ->where('nimi = ?'$name);
  33.             $result $this->fetchRow($select);
  34.             return $result;
  35.         }
  36.         /**
  37.          * @ignore
  38.          */
  39.         public function fetchIDByNimi($nimi)
  40.         {
  41.             $select $this->select();
  42.             $select->from($this)
  43.                     ->where('nimi = ?'$nimi);
  44.             return $this->fetchRow($select);
  45.         }
  46.         /**
  47.          * @ignore
  48.          */
  49.         public function fetchAllJSON()
  50.         {
  51.             $select $this->select();
  52.             $select->from(array('o' => 'osaleja')array('id''nimi AS text'));
  53.             return $this->fetchAll($select);
  54.         }
  55.     }
  56. ?>

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