本文整理汇总了PHP中getAllData函数的典型用法代码示例。如果您正苦于以下问题:PHP getAllData函数的具体用法?PHP getAllData怎么用?PHP getAllData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getAllData函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: cleanInput
$text = "";
$title_error = "";
$text_error = "";
if (isset($_GET["title"])) {
if (empty($_GET["title"])) {
$title_error = "See väli on kohustuslik!";
} else {
$title = cleanInput($_GET["title"]);
}
if (empty($_GET["text"])) {
$text_error = "See väli on kohustuslik!";
} else {
$text = cleanInput($_GET["text"]);
}
}
$note_array = getAllData();
?>
Tere, <?php
echo $_SESSION['logged_in_user_username'];
?>
<a href="?logout=1">Logi välja</a><br><br>
Sellel lehel saad hoida enda memosi/kirjutisi.<br>
NB! Tekst saab olla kuni 255 tähte pikk!<br><br>
<html>
<form action="<?php
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method='get'>
<textarea cols="50" rows="1" id="title" name="title" type="title" placeholder="Title..." value="<?php
echo $title;
开发者ID:p6hjanaba,项目名称:3.kodutoo-I-ruhm,代码行数:31,代码来源:data.php
示例17: deleteGlassData
<?php
require_once "functions.php";
// kuulan, kas kasutaja tahab kustutada
// ?delete=... on aadressireal
if (isset($_GET["delete"])) {
///saadan kustutatava auto id
deleteGlassData($_GET["delete"]);
}
//Kasutaja muudab andmeid
if (isset($_GET["update"])) {
//auto id, auto number, auto värv
updateGlassData($_GET["evo_glass_id"], $_GET["prillivarv"], $_GET["materjal"]);
}
// kõik autod objektide kujul massiivis
$evo_glass_array = getAllData();
$page_title = "Prillid";
$page_file_name = "table.php";
?>
<?php
require_once "header.php";
?>
<h1>Tabel</h1>
<table border=1>
<tr>
<th>id</th>
<th>kasutaja id</th>
<th>Prillivärv</th>
<th>Materjal</th>
<th>Kustuta</th>
开发者ID:raikolepik,项目名称:3.kodutoo-I-ruhm,代码行数:31,代码来源:table.php
示例18: getAllData
<?php
require_once "../functions.php";
$tex_array = getAllData();
if (isset($_GET["delete"])) {
deleteQweetData($_GET["delete"], $_GET["user"]);
}
if (isset($_GET["update"])) {
updateQweetData($_GET["qwert"], $_GET["qwert_id"], $_GET["user_id"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
$keyword = $_GET["keyword"];
$tex_array = getAllData($keyword);
} else {
$tex_array = getAllData();
}
if (isset($_GET["logout"])) {
//kustutame sessiooni muutujad
session_destroy();
header("Location: sisu.php");
}
if (isset($_SESSION['logged_in_user_id'])) {
echo "Tere, ", $_SESSION['logged_in_user_email'], "<a href='?logout=1'> Logi välja</a>";
}
$page_title = "Qweedid";
$page_file_name = "tabel.php";
require_once "../header.php";
?>
开发者ID:jissepo,项目名称:3.kodutoo-I-ruhm,代码行数:29,代码来源:table.php
示例19: cleanInput
$color_error = "Värv on kohustuslik";
} else {
$color = cleanInput($_POST["color"]);
}
if ($car_plate_error == "" && $color_error == "") {
createCarPlate($car_plate, color);
}
}
function cleanInput($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
getAllData();
?>
Tere, <?php
echo $_SESSION['logged_in_user_email'];
?>
<a href="?logout=1">Logi välja</a>
<h2> Lisa uus </h2>
<form>
<form action="<?php
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
" method="post" >
<label for="car_plate"> Auto numbrimärk </label>
<input id="car_plate" type="text" value="<?php
开发者ID:aantsman,项目名称:5_tund,代码行数:31,代码来源:data.php
示例20: deleteCarData
deleteCarData($_GET["delete"]);
}
//Kasutaja muudab andmeid
if (isset($_GET["update"])) {
//auto id, auto number, auto värv
updateCarData($_GET["car_id"], $_GET["number_plate"], $_GET["color"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
$keyword = $_GET["keyword"];
// otsime
$car_array = getAllData($keyword);
} else {
// näitame kõiki tulemusi
// kõik autod objektide kujul massiivis
$car_array = getAllData();
}
?>
<h1>Tabel</h1>
<form action="table.php" method="get">
<input name="keyword" type="search" value="<?php
echo $keyword;
?>
" >
<input type="submit" value="otsi">
<form>
<br><br>
<table border=1>
<tr>
开发者ID:raikolepik,项目名称:tund_7,代码行数:31,代码来源:table.php
注:本文中的getAllData函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论