本文整理汇总了PHP中Survey::insert方法的典型用法代码示例。如果您正苦于以下问题:PHP Survey::insert方法的具体用法?PHP Survey::insert怎么用?PHP Survey::insert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Survey
的用法示例。
在下文中一共展示了Survey::insert方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: add_oitem_save
public function add_oitem_save()
{
$id = get_post_value('id');
$item = get_post_value('item');
$field = array('issue_id' => $id, 'item' => $item, 'selected' => 0, 'status' => '10000', 'type' => '20000');
$m = new Survey();
$m->clear();
$m->setField($field);
$m->setTable(' vcb_survey_item ');
$data = $m->insert();
if (!empty($data)) {
header("Location:add_oitem?id=" . $id);
} else {
header("Location:error");
}
}
示例2: header
$newMessages = $user->getNewMessages();
header('Content-Type:application/json');
echo json_encode($newMessages);
break;
case 'send':
$user = new User($username);
$check = $user->sendMessage($text);
header('Content-Type:application/json');
echo json_encode($check);
break;
}
case 'response':
switch ($action) {
case 'new':
$survey = new Survey($title, $username, $response);
$check = $survey->insert();
header('Content-Type:application/json');
echo json_encode($check);
break;
case 'request':
$survey = new Survey();
$surveys = $survey->getAll();
header('Content-Type:application/json');
echo json_encode($surveys);
break;
case 'votes':
$survey = new Survey($title);
$votes = $survey->getVotes();
header('Content-Type:application/json');
echo json_encode($votes);
break;
示例3: re_other
private function re_other($i, $content)
{
$field = array('content' => $content, 'user_name' => '', 'user_ip' => $_SERVER["REMOTE_ADDR"], 'issue_id' => $i);
$m = new Survey();
$m->clear();
$m->setField($field);
$m->setTable('vcb_survey_other');
$m->insert();
}