本文整理汇总了PHP中Survey::select方法的典型用法代码示例。如果您正苦于以下问题:PHP Survey::select方法的具体用法?PHP Survey::select怎么用?PHP Survey::select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Survey
的用法示例。
在下文中一共展示了Survey::select方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displaySurveys
/**
* Displays surveys.
*
* @since 0.1
*/
protected function displaySurveys()
{
$this->displayAddNewControl();
$surveys = Survey::select(array('id', 'name', 'enabled', 'title'));
if (count($surveys) > 0) {
$this->displaySurveysTable($surveys);
}
$this->addModules('ext.survey.special.surveys');
}
示例2: array
function count_item($i)
{
$field = array('selected');
$m = new Survey();
$m->clear();
$m->setField($field);
$m->setTable('vcb_survey_item');
$m->setWhere('id', '=', $i);
$data = $m->select();
$add = $data[0]['selected'] + 1;
$field1 = array('selected' => $add);
$m1 = new Survey();
$m1->clear();
$m1->setField($field1);
$m1->setTable('vcb_survey_item');
$m1->setWhere('id', '=', $i);
$data_l = $m1->update();
//var_dump($data_l);
}
示例3: onArticleViewHeader
/**
* Hook to insert things into article headers.
*
* @since 0.1
*
* @param Article &$article
* @param boolean $outputDone
* @param boolean $useParserCache
*
* @return true
*/
public static function onArticleViewHeader(Article &$article, &$outputDone, &$useParserCache)
{
if (!Survey::has(array('enabled' => 1))) {
return true;
}
$surveys = Survey::select(array('id', 'namespaces', 'ratio', 'expiry', 'min_pages'), array('enabled' => 1, 'user_type' => Survey::getTypesForUser($GLOBALS['wgUser'])));
foreach ($surveys as $survey) {
if (count($survey->getField('namespaces')) == 0) {
$nsValid = true;
} else {
$nsValid = in_array($article->getTitle()->getNamespace(), $survey->getField('namespaces'));
}
if ($nsValid) {
$GLOBALS['wgOut']->addWikiText(Xml::element('survey', array('id' => $survey->getId(), 'ratio' => $survey->getField('ratio'), 'expiry' => $survey->getField('expiry'), 'min-pages' => $survey->getField('min_pages'))));
}
}
return true;
}
示例4: other_stat
public function other_stat()
{
$id = get_post_value('id');
$field = array('id', 'issue_id', 'user_name', 'user_ip', 'content');
$m = new Survey();
$m->clear();
$m->setField($field);
$m->setTable('vcb_survey_other');
$m->setWhere("issue_id", "=", $id);
$data = $m->select();
var_dump($data);
$field1 = array('id', 'issue');
$m1 = new Survey();
$m1->setField($field1);
$m1->setTable(' vcb_survey_issue ');
$m1->setWhere('id', "=", $id);
$data_issue = $m1->select();
$this->assign('data', $data);
$this->assign('data_issue', $data_issue);
}