查询以显示用户发布的帖子。
$sql = "SELECT B.title, B.article, B.article_id, B.posted_by, B.users_id,DATE_FORMAT(updated, '%m-%d-%Y %l:%i:%s') AS updated , U.user_pic_path, U.user_id, U.username, I.filename
FROM users U
INNER JOIN blog B
ON B.posted_by = U.user_id
LEFT OUTER JOIN images AS I
ON B.image_id = I.image_id
WHERE B.users_id = ?
AND B.posted_by = ?
ORDER BY updated DESC"
查询选择我朋友的用户。
$sql = "SELECT F.status,U.user_id, U.username, U.email, U.user_pic_path
FROM users U, friends F
WHERE
CASE
WHEN F.friend_one =?
THEN F.friend_two = U.user_id
WHEN F.friend_two = ?
THEN F.friend_one= U.user_id
END
AND F.status = 2";
所以我想展示作为我的朋友的用户所做的所有博客文章。要做到这一点,我必须加入两个加入两个查询。我被卡住了,不知道我怎么能这样做。
答案 0 :(得分:2)
您可以使用POST https://www.googleapis.com/gmail/v1/users/arpan%40intricare.net/messages/send?fields=raw&key={YOUR_API_KEY}
{
"raw": "UkNQVCBUTzogYWN0dWFsX3RvIDx0b0ByZWNpcGllbnQClRsuY29tPgpGcm9tOiBTZW5kZXIgPHNl
bmRlckBzZW5kZXIuY29tPiAKVG86IER1bW15X3RvIDxkdW1teUBkdW1teS5jb20-IApTdWJqZWN0
OiBTYXlpbmcgSGVsbG8gCiAgICAKVGhpcyBpcyBhIG1lc3NhZ2UganVzdCB0byBzYXkgaGVsbG8u
IFNvLCAiSGVsbG8iLg=="
}
:
帖子查询WHERE id_users IN(朋友查询)。
这样的事情:
conn.request("GET",path,headers=headers)
res = conn.getresponse()
if res.status == 500:
print "Shell Shock Exploitable "