当前位置: 首页>>代码示例>>PHP>>正文


PHP getAllData函数代码示例

本文整理汇总了PHP中getAllData函数的典型用法代码示例。如果您正苦于以下问题:PHP getAllData函数的具体用法?PHP getAllData怎么用?PHP getAllData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getAllData函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: json_encode

<?php

include_once '../../config/config.php';
include_once $serverPath . 'utils/db_get.php';
$table = 'events';
if (!empty($_GET['get'])) {
    $get = $_GET['get'];
    if ($get == 'grid') {
        echo json_encode(getAllData($table));
    }
}
if (!empty($_GET['id'])) {
    $id = $_GET['id'];
    echo json_encode(findById($table, $id));
}
开发者ID:Cassioblu55,项目名称:linger,代码行数:15,代码来源:data.php

示例2: array

                $aData['contestants'] = array();
                foreach ($Group as $Cont) {
                    $aData['contestants'][] = (object) array('lastName' => $Cont->lastName, 'firstName' => $Cont->firstName, 'rank' => $Cont->rank, 'score' => $Cont->score, 'category' => $levelStr[$Cont->level]);
                }
                tpl("templateLetter.html", $aData, true);
            }
            $i++;
        }
        tpl("templateFooter.html", array(), true);
        self::write();
    }
    public static function addCsvRow($School, $nbAwards)
    {
        $aData = array();
        foreach (array('name', 'address', 'zipcode', 'city', 'country', 'firstName', 'lastName') as $field) {
            $aData[] = $School->{$field};
        }
        $aData[] = $nbAwards;
        fputcsv(self::$csvFile, $aData, ";");
    }
}
//updateNbAwarded(2014);
$aSchools = getAllData();
Generation::makeAll($aSchools);
/*
UPDATE `school` LEFT JOIN school_user ON (school.ID = school_user.schoolID AND school.userID = school_user.userID) SET school.userID = NULL WHERE school_user.ID IS NULL
SELECT school.* FROM school JOIN school_user ON school.ID = school_user.schoolID WHERE school.userID = 0 ORDER BY school.ID
// Mise à jour du champ school_user.ownGroupsContestants
UPDATE `school_user` JOIN SELECT SUM(`nbStudentsEffective`) as `nbContestants`, `schoolID`, `userID` FROM `group` WHERE `participationType` = 'Official' GROUP BY `schoolID`, `userID`) as `groups` ON (school_user.schoolID = `groupS`.`schoolID` AND school_user.userID = `groupS`.`userID`) SET school_user.ownGroupsContestants = `nbContestants`;
UPDATE school JOIN (SELECT schoolID, MAX(ownGroupsContestants) as maxStudents FROM school_user GROUP BY schoolID) as bestSchoolUser ON (bestSchoolUser.schoolID = school.ID) JOIN school_user ON (school.ID = school_user.schoolID AND school_user.ownGroupsContestants = bestSchoolUser.maxStudents) SET school.userID = school_user.userID WHERE school.userID = 0
*/
开发者ID:BebrasTeam,项目名称:BebrasContestServer,代码行数:31,代码来源:generation.php

示例3: getAllData

if (isset($_GET["delete"])) {
    $Table->deleteContestData($_GET["delete"]);
}
//kasutaja muudab andmeid
if (isset($_GET["update"])) {
    $Table->updateContestData($_GET["contest_id"], $_GET["contest_name"], $_GET["name"]);
}
$contest_array = getAllData();
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    //otsime
    $contest_array = getAllData($keyword);
} else {
    //näitame kõik tulemused
    $contest_array = getAllData();
}
if (isset($_GET["confirm"])) {
    header("Location: confirm.php");
}
?>

<?php 
// lehe nimi
$page_title = "Osalejad";
?>

<?php 
require_once "../header.php";
?>
开发者ID:karlmarkuswahlberg,项目名称:php-ruhmatoo-projekt,代码行数:30,代码来源:table.php

示例4: yesAnswer

            $comment = "";
            echo $message;
        }
    }
}
// kuulan, kas kasutaja tahab vastata
if (isset($_GET["yes"])) {
    ///saadan kustutatava auto id
    yesAnswer($_GET["yes"]);
}
if (isset($_GET["no"])) {
    ///saadan kustutatava auto id
    noAnswer($_GET["no"]);
}
// kõik autod objektide kujul massiivis
$poll_array = getAllData();
?>
<p>
	Tere, <?php 
echo $_SESSION["logged_in_user_email"];
?>
 
		Tere, <?php 
echo $_SESSION["logged_in_user_id"];
?>
 
	<a href="login.php"> Logi välja <a> 
</p>

<h1>Nendele küsimustele saab vastata</h1>
<table border=1>
开发者ID:stenverkoop,项目名称:php-ruhmatoo-projekt,代码行数:31,代码来源:poll.php

示例5: getPossibleDupsData

<?php

$section = null;
$pageTitle = "Pagination";
include "inc/functions.php";
include "inc/variables.php";
$division = $_SESSION['division'];
$report = $_SESSION['report'];
if ($report == 'Possible Duplicates') {
    $data = getPossibleDupsData($division, 'rows');
} else {
    if ($report == 'All Data') {
        $data = getAllData($division, 'rows');
    } else {
        $data = getSummedChecksData($division, 'rows');
    }
}
if (isset($_POST["ExportType"])) {
    switch ($_POST["ExportType"]) {
        case "export-to-excel":
            // Submission from
            $filename = "possibleDuplicates_{$division}.{$fileDate}.xls";
            header("Content-Type: application/vnd.ms-excel");
            header("Content-Disposition: attachment; filename=\"{$filename}\"");
            ExportFile($data);
            //$_POST["ExportType"] = '';
            exit;
        case "export-to-csv":
            // Submission from
            $filename = "possibleDuplicates_{$division}.{$fileDate}.csv";
            header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
开发者ID:carobiscuit,项目名称:PFA,代码行数:31,代码来源:pagination.php

示例6: mysqli_set_charset

<?php

include_once '../../config/config.php';
include_once $serverPath . 'utils/db_get.php';
$table = "drinks";
mysqli_set_charset(connect(), "utf8");
if (!empty($_GET['get'])) {
    $get = $_GET['get'];
    if ($get == "grid") {
        $data = getAllData($table);
        echo json_encode($data, true);
    } elseif ($get == "drink_types") {
        $queryStatement = "SELECT DISTINCT(type) FROM {$table};";
        $data = runQuery($queryStatement);
        $array = [];
        foreach ($data as $row) {
            array_push($array, $row['type']);
        }
        echo json_encode($array);
    }
}
if (!empty($_GET['id'])) {
    $id = $_GET['id'];
    echo json_encode(findById($table, $id));
}
开发者ID:Cassioblu55,项目名称:linger,代码行数:25,代码来源:data.php

示例7: updateMedicalItem

    updateMedicalItem($_GET["update_id"], $_GET["update_cat"], $_GET["update_diagnose"], $_GET["update_comment"]);
    print_r("222");
}
//sesiooni muutujad
$role_id_for_data = $_SESSION["logged_in_user_role"];
$user_id_for_data = $_SESSION["logged_in_user_id"];
//aadressireal on otsingu keyword
if (isset($_GET["keyword"])) {
    //otsin
    $keyword = $_GET["keyword"];
    $med_array = getAllData($user_id_for_data, $role_id_for_data, $keyword);
} else {
    $keyword = "";
    // küsin kõik andmed
    //käivitan funktsiooni
    $med_array = getAllData($user_id_for_data, $role_id_for_data, $keyword);
}
?>

<h1>Sinu andmed</h1>

<H2> Lisa uus kirje</h2>

<form action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
	<label for="number_plate" >Kategooria</label>
	<input id="category" name="category" type="text" value="<?php 
echo $category;
?>
开发者ID:ardobirk,项目名称:3.kodutoo-III-ruhm,代码行数:31,代码来源:data.php

示例8: deleteMainData

<?php

require_once "functions.php";
if (isset($_GET["delete"])) {
    deleteMainData($_GET["delete"]);
}
if (isset($_GET["update"])) {
    updateMainData($_GET["id"], $_GET["toode"], $_GET["ostuhind"], $_GET["myygihind"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    // otsime
    $main_array = getAllData($keyword);
} else {
    $main_array = getAllData();
}
?>

Tere, <?php 
echo $_SESSION['email'];
?>

<h1>Tabel</h1>

<form action="main.php" method="get">
    <input name="keyword" type="search" value="<?php 
echo $keyword;
?>
" >
    <input type="submit" value="otsi">
开发者ID:Brandiit,项目名称:eksam,代码行数:31,代码来源:pandimaja.php

示例9: getAllData

if(isset($_GET["delete"])) {
		deleteComment($_GET["delete"]);
	}

if(isset($_GET["accept"])) {
		acceptComment($_GET["accept"]);
	}

$keyword = "";
	if(isset($_GET["keyword"])){
		$keyword = $_GET["keyword"];

		$procomments_array = getAllData($keyword);

	}else{
		$procomments_array = getAllData();
	}
?>
<h1>Kommentaarid</h1>
	<form action="moderate.php" method="get">
		<div class="col-sm-6">
			<input class="form-control" name="keyword" type="search" value="<?=$keyword?>">
		</div>
		<div class="col-sm-1">
			<input class="btn btn-default" type="submit" value="otsi">
		</div>
	<form>
	<br><br>
	<table class="table table-striped table-hover">
	<tr>
	<th>Kommentaari id</th>
开发者ID:raikolepik,项目名称:php-ruhmatoo-projekt,代码行数:31,代码来源:moderate.php

示例10: header

<?php 
require_once "functions.php";
if (!isset($_SESSION['logged_in_user_id'])) {
    header("Location: login.php");
}
if (isset($_GET["logout"])) {
    session_destroy();
    header("Location: login.php");
}
$bird_array = getAllData();
?>
<h1>Linnuvaatluse tabel</h1>
<table border=1>
<tr>
	
	<th>Kasutaja ID</th>
	<th>Linnuliik</th>
	<th>Vaatlusaeg</th>
	<th>Lindude arv</th>
	
</tr>
<?php 
for ($i = 0; $i < count($bird_array); $i++) {
    if (isset($_GET["edit"]) && $_GET["edit"] == $bird_array[$i]->id) {
        echo "<tr>";
        echo "<form action='table.php' method='get'>";
        echo "<input type='hidden' name='bird_id' value='" . $bird_array[$i]->id . "'>";
        echo "<td>" . $bird_array[$i]->user_id . "</td>";
        echo "<td><input name='bird_name' value='" . $bird_array[$i]->bird_name . "'></td>";
        echo "<td><input name='observed' value='" . $bird_array[$i]->observed . "'></td>";
开发者ID:karlmarkuswahlberg,项目名称:eksam,代码行数:30,代码来源:table.php

示例11: getQueryObject

// read params from GET and package it as an array
function getQueryObject($param)
{
    $qryObj = json_decode(stripslashes($param), true);
    $qryObj2 = array("user" => "yinxj", "product" => "armani", "type_obj" => array("searchtb037_ds" => array("search.process.time", "cluster.time", "search.state", "search.process.state", "cluster.status")), "from_ts" => "1357706040", "end_ts" => "1357709640");
    return $qryObj;
}
$qryObj = getQueryObject($_GET["param"]);
#var_dump($qryObj);
//get detail query info
$user = $qryObj["user"];
$product = $qryObj["product"];
$typeobj = $qryObj["type_obj"];
$begin_ts = $qryObj["from_ts"];
$end_ts = $qryObj["end_ts"];
$results = getAllData($user, $product, $typeobj, $begin_ts, $end_ts);
// get results from mysql and unpack it as a string
echo json_encode($results);
#system("echo ".json_encode($results).">> 1");
mysql_close($db);
// ============ Function Area =================
function startsWith($haystack, $needle)
{
    return !strncmp($haystack, $needle, strlen($needle));
}
function endsWith($haystack, $needle)
{
    $length = strlen($needle);
    if ($length == 0) {
        return true;
    }
开发者ID:sleepyycat,项目名称:WebFramework,代码行数:31,代码来源:readLog.php

示例12: deleteHomeworkData

require_once "functions.php";
require_once "edit_functions.php";
if (isset($_GET["delete"])) {
    deleteHomeworkData($_GET["delete"]);
}
if (isset($_GET["update"])) {
    updateHomeworkData($_GET["homework_id"], $_GET["homework"], $_GET["date"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    // otsime
    $homework_array = getAllData($keyword);
} else {
    $homework_array = getAllData();
}
if (isset($_GET["logout"])) {
    //kustutame sessiooni muutujad
    session_destroy();
    header("Location: login.php");
}
?>

Tere, <?php 
echo $_SESSION['email'];
?>

<h1>Tabel</h1>

<form action="table.php" method="get">
开发者ID:Brandiit,项目名称:3.kodutoo-I-ruhm,代码行数:30,代码来源:table.php

示例13: header

<?php

require_once "functions.php";
if (!isset($_SESSION["logged_in_user_id"])) {
    header("Location: login.php");
}
if (isset($_GET["logout"])) {
    session_destroy();
    header("Location: login.php");
}
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    $orders_array = getAllData($keyword);
} else {
    $orders_array = getAllData();
}
if (isset($_GET["update"])) {
    updateOrdersData(cleanInput($_GET["orders_id"]), cleanInput($_GET["text_type"]), cleanInput($_GET["subject"]), cleanInput($_GET["target_group"]), cleanInput($_GET["description"]), cleanInput($_GET["source"]), cleanInput($_GET["length"]), cleanInput($_GET["deadline"]), cleanInput($_GET["output"]));
}
if (isset($_GET["delete"])) {
    deleteOrdersData($_GET["delete"]);
}
function cleanInput($data)
{
    $data = trim($data);
    $data = stripslashes($data);
    $data = htmlspecialchars($data);
    return $data;
}
?>
开发者ID:naaber,项目名称:3.kodutoo-I-ruhm,代码行数:31,代码来源:table.php

示例14: header

if (!isset($_SESSION['logged_in_user_id'])) {
    header("Location: login.php");
}
if (isset($_GET["delete"])) {
    deleteTodoData($_GET["delete"]);
}
if (isset($_GET["update"])) {
    updateTodoData($_GET["todo_id"], $_GET["todo"], $_GET["date"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    // otsime
    $todo_array = getAllData($keyword);
} else {
    $todo_array = getAllData($keyword);
}
if (isset($_GET["logout"])) {
    //kustutame sessiooni muutujad
    session_destroy();
    header("Location: login.php");
}
$todo = $date = '';
$todo_error = $date_error = '';
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    if (isset($_POST["add_todo"])) {
        if (empty($_POST["todo"])) {
            $todo_error = "Ei saa mitte midagi lisada.";
        } else {
            $todo = cleanInput($_POST["todo"]);
        }
开发者ID:Richard-Aasa,项目名称:3.kodutoo-I-ruhm,代码行数:31,代码来源:table.php

示例15: session_destroy

    session_destroy();
    header("Location: login.php");
}
if (isset($_GET["delete"])) {
    deleteHabitat($_GET["delete"]);
}
if (isset($_GET["update"])) {
    updateHabitat($_GET["habitat_id"], $_GET["gps_point"], $_GET["location"], $_GET["habitat_name"], $_GET["habitat_code"]);
}
$habitat_array = getAllData();
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    $habitat_array = getAllData($keyword);
} else {
    $habitat_array = getAllData();
}
?>

<h1>Elupaikade tabel</h1>

<a href="data.php">Sisesta uus elupaik</a><br>

<br><a href="?logout=1">Logi välja!</a><br>

<br><form action="table.php" method="get">
	<input name="keyword" type="search" value="<?php 
echo $keyword;
?>
">
	<input type="submit" value="otsi">
开发者ID:karlmarkuswahlberg,项目名称:3.kodutoo,代码行数:31,代码来源:table.php


注:本文中的getAllData函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。