本文整理汇总了PHP中Contest::fetch_all方法的典型用法代码示例。如果您正苦于以下问题:PHP Contest::fetch_all方法的具体用法?PHP Contest::fetch_all怎么用?PHP Contest::fetch_all使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Contest
的用法示例。
在下文中一共展示了Contest::fetch_all方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Contest
<?php
session_start();
include_once '../includes/connection.php';
include_once '../includes/Contest.php';
$contest = new Contest();
if (isset($_SESSION['name']) and $_SESSION['id'] == '10207674962976867') {
if (isset($_GET['id_event'])) {
$id_news = $_GET['id_event'];
$query = $pdo->prepare('DELETE FROM Concursos WHERE id_event = ?');
$query->bindValue(1, $id_event);
$query->execute();
echo "<script type=\"text/javascript\">\n alert('Se ha borrado correctamente el concurso');\n history.go(-2);\n </script>";
exit;
}
$contests = $contest->fetch_all();
?>
<html>
<head>
<title>Eliminar Concurso - Version editable</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
</head>
<body>
<div class="container">
<!--<a href="index.php" id="logo">CMS</a>-->
<br/>
<h4>Selecciona un concurso para borrar</h4>
示例2: Contest
<?php
session_start();
include_once '../../TOMO2-Web/includes/connection.php';
include_once '../../TOMO2-Web/includes/Answer.php';
include_once '../../TOMO2-Web/PDO/AnswerModel.php';
include_once '../../TOMO2-Web/includes/Contest.php';
include_once '../../TOMO2-Web/PDO/ContestModel.php';
//include_once ('../img_bbdd/upload.php');
$conc = new Contest();
if (isset($_SESSION['name']) and $_SESSION['id'] == '10207674962976867') {
$id_answer = $_GET['id_answer'];
$id_event = $_GET['id_event'];
$concursos = $conc->fetch_all();
$answer = new Answer();
$answerModel = new AnswerModel();
$image = array(null);
$directory = "img_bbdd/helados.jpg";
/*
if (isset($_GET['name'], $_GET['description'], $_GET['upload_date'], $_GET['image'], $_GET['link'], $_GET['active'])){
$name = $_GET['name'];
$description = nl2br($_GET['description']);
$upload_date = $_GET['upload_date'];
$link = $_GET['image'];
$image = $_GET['link'];
$active = $_GET['active'];
if (empty($name) or empty($description) or empty($upload_date)){
$error = 'There are some fields empty. The only empty field accepted is "image" or "link" field';
} else {
$query = $pdo->prepare('INSERT INTO Noticias (name, description, upload_date, image, link, active) VALUES (?, ?, ?, ?, ?, ?)');