本文整理匯總了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)
{