本文整理匯總了PHP中DatabaseFactory::passinggreen_master_db方法的典型用法代碼示例。如果您正苦於以下問題:PHP DatabaseFactory::passinggreen_master_db方法的具體用法?PHP DatabaseFactory::passinggreen_master_db怎麽用?PHP DatabaseFactory::passinggreen_master_db使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DatabaseFactory
的用法示例。
在下文中一共展示了DatabaseFactory::passinggreen_master_db方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: lookup_member
public static function lookup_member($id = null, $email = null)
{
$id = (int) $id;
$email = trim($email);
$sql = "SELECT `AutoID` , `useremail`, `userFirstname`, `userLastname` FROM `user_signup`";
if ($id || $email || $author) {
$sql .= " WHERE";
} else {
return null;
}
if ($id) {
$sql .= " `AutoID` = '{$id}'";
if ($email || $author) {
$sql .= " &&";
}
}
if ($email) {
$sql .= " `useremail` = '{$email}'";
}
if ($res = DatabaseFactory::passinggreen_master_db()->query($sql)) {
if ($res->num_rows == 1) {
$member = $res->fetch_object();
return new Member($member->AutoID);
} else {
return null;
}
}
return null;
}
示例2: findCryptKeyByUserID
public static function findCryptKeyByUserID($id)
{
$id = (int) $id;
$sql = "SELECT `UserID` FROM `keys`";
if ($id) {
$sql .= " WHERE";
} else {
return null;
}
if ($id) {
$sql .= " `UserID` = '{$id}'";
}
if ($res = DatabaseFactory::passinggreen_master_db()->query($sql)) {
if ($res->num_rows == 1) {
$crypt_key = $res->fetch_object();
return new self($crypt_key->UserID);
} else {
return null;
}
}
return null;
}
示例3: master_db
protected function master_db()
{
return DatabaseFactory::passinggreen_master_db();
}