本文整理汇总了PHP中DB_Functions::getUid方法的典型用法代码示例。如果您正苦于以下问题:PHP DB_Functions::getUid方法的具体用法?PHP DB_Functions::getUid怎么用?PHP DB_Functions::getUid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DB_Functions
的用法示例。
在下文中一共展示了DB_Functions::getUid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$response["user"]["email"] = $user["email"];
$response["user"]["created_at"] = $user["created_at"];
$response["user"]["updated_at"] = $user["updated_at"];
echo json_encode($response);
} else {
// user not found
// echo json with error = 1
$response["error"] = 1;
$response["error_msg"] = "Incorrect email or password!";
echo json_encode($response);
}
} else {
if ($tag == 'sendRequest') {
$email = $_POST['fromemail'];
$toEmail = $_POST['toemail'];
$fromid = $db->getUid($email);
$toid = $db->getUid($toEmail);
$relation = $db->getRelation($toid, $fromid);
if ($relation == -1) {
$relationOp = $db->getRelation($fromid, $toid);
if ($relationOp == -1) {
$user = $db->updateRequest($fromid, $toid);
if ($user != false) {
// user found
// echo json with success = 1
$response["success"] = 1;
$response["success_msg"] = "Friend Request Sent";
echo json_encode($response);
} else {
// user not found
// echo json with error = 1
示例2: echo
<?php
require_once 'include/DB_Functions.php';
$db = new DB_Functions();
$email = "harsha@gmail.com";
$emailId = $email;
$toId = $db->getUid($emailId);
$idArr = $db->getReminders($toId);
if ($idArr == -1) {
$resp["reminders"] = "no reminders";
echo json_encode($resp);
} else {
$resp["id"] = $idArr;
$resp["emails"] = $idArr;
echo json_encode($resp);
}
/* $toEmail = "harsha.ms7@gmail.com";
echo $db->deleteReminder(2);
// echo $arr[0][0];
/*
echo ($db->getReminders(1));
/*
$fromid = $db->getUid($email);
echo $fromid;
$toid = $db->getUid($toEmail);
echo "toid" . $toid;
echo $db->setReminder("Pick Me up", $fromid, $toid, 70.6588, -85.2365, "Charlotte", 50 ); /*
if( $db->getRelation($fromid, $toid)==-1)
{