import v2.0.0.0_RC3 | 2012-07-01

https://github.com/lucanos/CommunityID -> http://www.itadmins.net/archives/357
This commit is contained in:
2019-07-17 22:31:04 +02:00
parent 38c146901c
commit 2f397f01f7
2677 changed files with 296182 additions and 45159 deletions

20
libs/Monkeys/Db/Table/Gateway.php Executable file → Normal file
View File

@ -1,9 +1,27 @@
<?php
/*
* @copyright Copyright (C) 2005-2010 Keyboard Monkeys Ltd. http://www.kb-m.com
* @license http://creativecommons.org/licenses/BSD/ BSD Licensese
* @author Keyboard Monkeys Ltd.
* @package Monkeys Framework
* @packager Keyboard Monkeys
*/
abstract class Monkeys_Db_Table_Gateway extends Zend_Db_Table_Abstract
{
const ASC = 'ASC';
const DESC = 'DESC';
public function getRowInstance($id)
{
return $this->fetchRow($this->select()->where('id = ?', $id));
return $this->find($id)->current();
}
public function getRandomRowInstance(Projects_Model_Project $project)
{
$select = $this->select()->where('project_id=?', $project->id)->order(new Zend_Db_Expr('RAND()'));
return $this->fetchRow($select);
}
}