获取参数
Tool::getSafeText($this->getRequest()->get('ordertype'));
//文本入库前的过滤工作 Tool::getSafeText
public static function getSafeText($textString, $htmlspecialchars = false) {
if(!get_magic_quotes_gpc()) $textString = addslashes($textString);
return $htmlspecialchars ? htmlspecialchars(trim($textString),ENT_QUOTES) : trim(strip_tags($textString));
}
取回执行数据
$this->getAdapter()->fetchRow($sql_total);
$this->getAdapter()->fetchAll($sql);
别的模型的方法
$cates = $this->model('Api_Model_Sgp')->getCagtes($row);
自己对应模型的方法
protected $_modelName = "Api_Model_Sagnd";
$new_weeks = $this->_model->getDateLabel();