summaryrefslogtreecommitdiffstats
path: root/application/models/RightRolesMapper.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/models/RightRolesMapper.php')
-rw-r--r--application/models/RightRolesMapper.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/application/models/RightRolesMapper.php b/application/models/RightRolesMapper.php
index ae409d8..e2adff5 100644
--- a/application/models/RightRolesMapper.php
+++ b/application/models/RightRolesMapper.php
@@ -5,6 +5,21 @@ class Application_Model_RightRolesMapper
protected $_dbTable;
+ public function findBy($criteria, $value)
+ {
+ try{
+ $db = Zend_Db_Table::getDefaultAdapter();
+ $select = $this->getDbTable()->select()
+ ->from($this->_dbTable)
+ ->where($criteria . ' = ?', $value);
+ $stmt = $select->query();
+ $result = $stmt->fetchAll();
+ return $result;
+ }catch (Zend_Exception $e) {
+ echo "Error message 2: " . $e->getMessage() . "\n";
+ }
+ }
+
public function setDbTable($dbTable)
{
if (is_string($dbTable)) {