本文整理匯總了PHP中Help::fetchRow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Help::fetchRow方法的具體用法?PHP Help::fetchRow怎麽用?PHP Help::fetchRow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Help
的用法示例。
在下文中一共展示了Help::fetchRow方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: deleteAction
/** Delete a help topic
* @access public
* @return void
*/
public function deleteAction()
{
if ($this->_request->isPost()) {
$id = (int) $this->_request->getPost('id');
$del = $this->_request->getPost('del');
if ($del == 'Yes' && $id > 0) {
$where = 'id = ' . $id;
$this->_help->delete($where);
$this->getFlash()->addMessage('Record deleted!');
}
$this->redirect('/admin/help/');
} else {
$id = (int) $this->_request->getParam('id');
if ($id > 0) {
$this->view->content = $this->_help->fetchRow('id=' . $id);
}
}
}
示例2: attachedAction
/** Show images attached to record
* @access public
* @return void
* @throws Pas_Exception_Param
*/
public function attachedAction()
{
if ($this->getParam('id', false)) {
$help = new Help();
$this->view->contents = $help->fetchRow('id = 14')->toArray();
$images = new Slides();
$this->view->images = $images->getSlides($this->getParam('id'));
} else {
throw new Pas_Exception_Param($this->_missingParameter, 404);
}
}