本文整理汇总了PHP中Connect::GetRow方法的典型用法代码示例。如果您正苦于以下问题:PHP Connect::GetRow方法的具体用法?PHP Connect::GetRow怎么用?PHP Connect::GetRow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Connect
的用法示例。
在下文中一共展示了Connect::GetRow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: explode
$safe = false;
}
if (array_key_exists('profid', $_POST)) {
$profid = filter_input(INPUT_POST, 'profid');
} else {
$safe = false;
}
if (array_key_exists('token', $_POST)) {
$token = filter_input(INPUT_POST, 'token');
} else {
$safe = false;
}
if ($safe) {
$authenticated = $connection->Verify($connectinfo, $profid, $token);
if ($authenticated) {
$row = $connection->GetRow($connectinfo, 0, $groupid);
$admin = $row["starter"];
$invitedlist = $row["people_requested"];
if ($admin == $profid) {
$invitedarray = explode(";", $invitedlist);
if (is_array($invitedarray) || is_object($invitedarray)) {
foreach ($invitedarray as $invitee) {
//Delete all traces of the group brah!
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_accepted", $groupid);
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_declined", $groupid);
$connection->RemovefromList($connectinfo, 2, $invitee, "groups_left", $groupid);
$connection->RemoveItemfromList($connectinfo, 1, $invitee, "groups_pending", "groupid:" . strval($groupid), "data");
$connection->RemoveItemfromList($connectinfo, 1, $invitee, "groups_decision", "groupid:" . strval($groupid), "data");
}
}
$sql = $connectinfo->prepare("DELETE FROM Groups WHERE id = :groupid");
示例2: Connect
<?php
include 'connect.php';
$connection = new Connect();
$connectinfo = $connection->GetConnection();
$column = "groups_pending";
$currentrow = $connection->GetRow($connectinfo, 1, "863307073758034");
$notifraw = $connection->GetValue($connectinfo, 1, "863307073758034", "notification_raw");
$notiflist = explode(";", $notifraw);
$columnid = array_search($column, array_keys($currentrow));
print_r($columnid);
print_r($notiflist);
$notifremove = [];
$removeindex = [1];
$occurencecount = 0;
//NEED TO REMOVE FROM RAW AS WELL!
for ($b = 0; $b < count($notiflist); $b++) {
if ($notiflist[$b] == $columnid) {
if (in_array($occurencecount, $removeindex)) {
$notifremove[] = $b;
}
$occurencecount++;
}
}
print_r($notifremove);
for ($a = 0; $a < count($notifremove); $a++) {
unset($notiflist[$notifremove[$a] - $a]);
}
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
示例3: unserialize
}
if (array_key_exists('type', $_POST)) {
$type = filter_input(INPUT_POST, 'type');
} else {
$safe = false;
}
if (array_key_exists('data', $_POST)) {
$data = filter_input(INPUT_POST, 'data');
} else {
$safe = false;
}
if ($safe) {
$authenticated = $connection->Verify($connectinfo, $profid, $token);
if ($authenticated) {
$notificationarray = [];
$row = $connection->GetRow($connectinfo, 1, $profid);
$type = $type + 2;
$current = $row[$type];
$column = array_keys($row)[$type * 2];
if ($current == null || $current == "") {
} else {
$currentarray = unserialize($current);
$decrementcount = 0;
$countarray = count($currentarray);
$removeindex = [];
$removestub = [];
if (is_array($currentarray)) {
if (isset($currentarray['isread'])) {
if ($currentarray['data'] == $data) {
if ($currentarray["isread"] == 0) {
$decrementcount++;
示例4: elseif
//Get accepted groups
$groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_accepted");
} elseif ($type == 1) {
//Get declined groups
$groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_declined");
} elseif ($type == 2) {
//Get left groups
$groupstring = $connection->GetValue($connectinfo, 2, $profid, "groups_left");
}
if (count($groupstring) == 0 || $groupstring == null) {
echo null;
} else {
$grouparray = explode(";", $groupstring);
$returnarray = array();
foreach ($grouparray as $currentid) {
$row = $connection->GetRow($connectinfo, 0, $currentid);
$name = $row["name"];
$id = $row["id"];
$currentacceptedarray = explode(";", $row["people_accepted"]);
$currentinvited = explode(";", $row["people_requested"]);
$starter = $row["starter"];
if ($starter == $profid) {
$admin = 1;
} else {
$admin = 0;
}
$currentgroup = array("Name" => $name, "GroupID" => $id, "Members" => $currentacceptedarray, "Invited" => $currentinvited, "Admin" => $admin);
$returnarray[$currentid] = $currentgroup;
}
echo json_encode($returnarray);
}
示例5: foreach
$token = filter_input(INPUT_POST, 'token');
} else {
$safe = false;
}
if (array_key_exists('id', $_POST)) {
$idarray = filter_input(INPUT_POST, 'id', FILTER_DEFAULT, FILTER_REQUIRE_ARRAY);
if (count($idarray) < 1) {
$safe = false;
}
} else {
$safe = false;
}
if ($safe) {
$authenticated = $connection->Verify($connectinfo, $profid, $token);
if ($authenticated) {
$output = [];
foreach ($idarray as $id) {
$row = $connection->GetRow($connectinfo, 2, $id);
$name = $row["name"];
$id = $row["id"];
$url = $row["url"];
$currentprofile = array("Name" => $name, "Profid" => $id, "Url" => $url);
$output[] = $currentprofile;
}
echo json_encode($output);
} else {
echo "Error - authorization mismatch";
}
} else {
echo 'Error - invalid supplied post data (not enough info?)';
}