當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Contest::fetch_all方法代碼示例

本文整理匯總了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>
開發者ID:Gonxis,項目名稱:TOMO2_Project,代碼行數:31,代碼來源:deleteContest.php

示例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 (?, ?, ?, ?, ?, ?)');
開發者ID:Gonxis,項目名稱:TOMO2_Project,代碼行數:31,代碼來源:modifyAnswers.php


注:本文中的Contest::fetch_all方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。