Posted By

yigit on 05/21/11


Tagged


Versions (?)

ZF Settings


 / Published in: PHP
 

  1. <?php
  2. // application/models/Settings.php
  3.  
  4. class Application_Model_Settings extends Zend_Db_Table_Abstract
  5. {
  6. protected $_name = 'settings';
  7. protected $_primary = 'id';
  8.  
  9. public function getByKey($key)
  10. {
  11. $data = $this->fetchRow($this->select(), 'key =', $key);
  12.  
  13. return $data;
  14. }
  15.  
  16. public function getById($id)
  17. {
  18. $data = $this->fetchRow($this->select(), 'key =', $key);
  19.  
  20. return $data;
  21. }
  22. }

Report this snippet  

You need to login to post a comment.