_CommentManage_DeleteComment=`UPDATE @comment SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
_CommentManage_DeleteComment=`UPDATE @comment SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
_CommentManage_DeleteCommentReply=`UPDATE @comment_reply SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
_CommentManage_DeleteCommentReply=`UPDATE @comment_reply SET deleted_on=?, is_del=1 WHERE id=? AND is_del=0`
_CommentManage_DeleteCommentThumbs=`UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND tweet_id=? AND comment_id=? AND is_del=0`
_CommentManage_DeleteCommentThumbs=`UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND tweet_id=? AND comment_id=? AND is_del=0`
_CommentManage_DeleteReplyThumbs=`UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND comment_id=? AND reply_id=? AND is_del=0`
_CommentManage_DeleteReplyThumbs=`UPDATE @tweet_comment_thumbs SET deleted_on=?, is_del=1 WHERE user_id=? AND comment_id=? AND reply_id=? AND is_del=0`
_CommentManage_GetCommentReplyThumb=`SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND reply_id=? AND comment_type=1 AND is_del=0`
_CommentManage_GetCommentReplyThumb=`SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND reply_id=? AND comment_type=1 AND is_del=0`
_CommentManage_GetTweetCommentThumb=`SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND comment_type=0 AND is_del=0`
_CommentManage_GetTweetCommentThumb=`SELECT * FROM @tweet_comment_thumbs WHERE user_id=? AND tweet_id=? AND comment_id=? AND comment_type=0 AND is_del=0`
_CommentManage_UpdateCommentThumbsCount=`UPDATE @comment SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
_CommentManage_UpdateCommentThumbsCount=`UPDATE @comment SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
_CommentManage_UpdateReplyThumbsCount=`UPDATE @comment_reply SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
_CommentManage_UpdateReplyThumbsCount=`UPDATE @comment_reply SET thumbs_up_count=?, thumbs_down_count=?, modified_on=? WHERE id=? AND is_del=0`
_CommentManage_UpdateThumbsUpdownComment=`UPDATE @tweet_comment_thumbs SET is_thumbs_up=:is_thumbs_up, is_thumbs_down=:is_thumbs_down, modified_on=:modified_on WHERE id=:id AND is_del=0`
_CommentManage_UpdateThumbsUpdownComment=`UPDATE @tweet_comment_thumbs SET is_thumbs_up=:is_thumbs_up, is_thumbs_down=:is_thumbs_down, modified_on=:modified_on WHERE id=:id AND is_del=0`
_ContactManager_AddFriendMsgsUpdate=`UPDATE @message SET reply_id=?, modified_on=? WHERE ((sender_user_id = ? AND receiver_user_id = ?) OR (sender_user_id = ? AND receiver_user_id = ?)) AND type = ? AND reply_id = ?`
_ContactManager_AddFriendMsgsUpdate=`UPDATE @message SET reply_id=?, modified_on=? WHERE ((sender_user_id = ? AND receiver_user_id = ?) OR (sender_user_id = ? AND receiver_user_id = ?)) AND type = ? AND reply_id = ?`
_ContactManager_DelFriend=`UPDATE @contact SET status=4, is_del=1, deleted_on=? WHERE id=?`
_ContactManager_DelFriend=`UPDATE @contact SET status=4, is_del=1, deleted_on=? WHERE id=?`
_ContactManager_FreshContactStatus=`UPDATE @contact SET status=?, modified_on=?, is_del=0 WHERE id=?`
_ContactManager_FreshContactStatus=`UPDATE @contact SET status=?, modified_on=?, is_del=0 WHERE id=?`
_ContactManager_GetContact=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=?`
_ContactManager_GetContact=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=?`
_ContactManager_GetContacts=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE (user_id=? AND friend_id=?) OR (user_id=? AND friend_id=?)`
_ContactManager_GetContacts=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE (user_id=? AND friend_id=?) OR (user_id=? AND friend_id=?)`
_ContactManager_GetUserFriend=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0`
_ContactManager_GetUserFriend=`SELECT id, user_id, friend_id, group_id, remark, status, is_top, is_black, notice_enable, is_del FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0`
_ContactManager_IsFriend=`SELECT true FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0 AND status=2`
_ContactManager_IsFriend=`SELECT true FROM @contact WHERE user_id=? AND friend_id=? AND is_del=0 AND status=2`
_ContactManager_ListFriend=`SELECT c.friend_id user_id, u.username username, u.nickname nickname, u.avatar avatar, u.phone phone FROM @contact c JOIN @user u ON c.friend_id=u.id WHERE user_id=? AND status=2 AND is_del=0 ORDER BY u.nickname ASC LIMIT ? OFFSET ?`
_ContactManager_ListFriend=`SELECT c.friend_id user_id, u.username username, u.nickname nickname, u.avatar avatar, u.phone phone FROM @contact c JOIN @user u ON c.friend_id=u.id WHERE user_id=? AND status=2 AND is_del=0 ORDER BY u.nickname ASC LIMIT ? OFFSET ?`
_ContactManager_RejectFriendMsgsUpdate=`UPDATE @message SET reply_id=?, modified_on=? WHERE sender_user_id = ? AND receiver_user_id = ? AND type = ? AND reply_id = ?`
_ContactManager_RejectFriendMsgsUpdate=`UPDATE @message SET reply_id=?, modified_on=? WHERE sender_user_id = ? AND receiver_user_id = ? AND type = ? AND reply_id = ?`
_ContactManager_TotalFriendsById=`SELECT count(*) FROM @contact WHERE user_id=? AND status=2 AND is_del=0`
_ContactManager_TotalFriendsById=`SELECT count(*) FROM @contact WHERE user_id=? AND status=2 AND is_del=0`
_FollowIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_FollowIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_FollowIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_FollowIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_FriendIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_FriendIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_FriendIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_FriendIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_LightIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_LightIndexA_UserInfo=`SELECT * FROM @user WHERE username=?`
_LightIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_LightIndex_UserInfo=`SELECT * FROM @user WHERE username=?`
_TopicA_NewestTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM @tag t JOIN @user u ON t.user_id = u.id WHERE t.is_del = 0 AND t.quote_num > 0 ORDER BY t.id DESC LIMIT ? OFFSET ?`
_TopicA_NewestTags=`SELECT t.id id, t.user_id user_id, t.tag tag, t.quote_num quote_num, u.id, u.nickname, u.username, u.status, u.avatar, u.is_admin FROM @tag t JOIN @user u ON t.user_id = u.id WHERE t.is_del = 0 AND t.quote_num > 0 ORDER BY t.id DESC LIMIT ? OFFSET ?`
_TopicA_TagsByIdA=`SELECT id FROM @tag WHERE id IN (?) AND is_del = 0 AND quote_num > 0`
_TopicA_TagsByIdA=`SELECT id FROM @tag WHERE id IN (?) AND is_del = 0 AND quote_num > 0`
_TopicA_TagsByIdB=`SELECT id, user_id, tag, quote_num FROM @tag WHERE id IN (?)`
_TopicA_TagsByIdB=`SELECT id, user_id, tag, quote_num FROM @tag WHERE id IN (?)`
_TopicA_TagsByKeywordA=`SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 ORDER BY quote_num DESC LIMIT 6`
_TopicA_TagsByKeywordA=`SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 ORDER BY quote_num DESC LIMIT 6`
_TopicA_TagsByKeywordB=`SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 AND tag LIKE ? ORDER BY quote_num DESC LIMIT 6`
_TopicA_TagsByKeywordB=`SELECT id, user_id, tag, quote_num FROM @tag WHERE is_del = 0 AND tag LIKE ? ORDER BY quote_num DESC LIMIT 6`
_TopicA_TagsForIncr=`SELECT id, user_id, tag, quote_num FROM @tag WHERE tag IN (?)`
_TopicA_TagsForIncr=`SELECT id, user_id, tag, quote_num FROM @tag WHERE tag IN (?)`
_TweetA_AttachmentByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_AttachmentByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_FavoriteByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_FavoriteByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_ReactionByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_ReactionByTweetId=`SELECT * FROM @user WHERE username=?`
_TweetA_TweetInfoById=`SELECT * FROM @user WHERE username=?`
_TweetA_TweetInfoById=`SELECT * FROM @user WHERE username=?`
_TweetA_TweetItemById=`SELECT * FROM @user WHERE username=?`
_TweetA_TweetItemById=`SELECT * FROM @user WHERE username=?`
_TweetA_UserFavorites=`SELECT * FROM @user WHERE username=?`
_TweetA_UserFavorites=`SELECT * FROM @user WHERE username=?`
_TweetA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetA_UserReactions=`SELECT * FROM @user WHERE username=?`
_TweetA_UserReactions=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByAdmin=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByAdmin=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByFriend=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByFriend=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByGuest=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsByGuest=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsBySelf=`SELECT * FROM @user WHERE username=?`
_TweetA_UserTweetsBySelf=`SELECT * FROM @user WHERE username=?`
_Tweet_GetAnyPostCount=`SELECT count(*) FROM @post WHERE visibility IN (?)`
_Tweet_GetAnyPostCount=`SELECT count(*) FROM @post WHERE visibility IN (?)`
_Tweet_GetAnyPosts=`SELECT * FROM @post WHERE visibility IN (?) AND is_del=0 LIMIT ? OFFSET ?`
_Tweet_GetAnyPosts=`SELECT * FROM @post WHERE visibility IN (?) AND is_del=0 LIMIT ? OFFSET ?`
_Tweet_GetPostAttachmentBill=`SELECT * FROM @user WHERE username=?`
_Tweet_GetPostAttachmentBill=`SELECT * FROM @post_attachment_bill WHERE post_id=? AND user_id=? AND is_del=0`
_Tweet_GetPostById=`SELECT * FROM @post WHERE id=? AND is_del=0`
_Tweet_GetPostById=`SELECT * FROM @post WHERE id=? AND is_del=0`
_Tweet_GetPostContentById=`SELECT * FROM @user WHERE username=?`
_Tweet_GetPostContentById=`SELECT * FROM @post_content WHERE id=? AND is_del=0`
_Tweet_GetPostContentsByIds=`SELECT * FROM @post_content WHERE post_id IN (?) AND is_del=0`
_Tweet_GetPostContentsByIds=`SELECT * FROM @post_content WHERE post_id IN (?) AND is_del=0`
_Tweet_GetUserPostCollection=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostCollection=`SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.post_id = ? AND s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY P.ID DESC`
_Tweet_GetUserPostCollectionCount=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostCollectionCount=`SELECT count(*) FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) )`
_Tweet_GetUserPostCollections=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostCollections=`SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_collection s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY s.ID DESC, P.ID DESC LIMIT ? OFFSET ?`
_Tweet_GetUserPostCount=`SELECT count(*) FROM @post WHERE user_id=? AND visibility IN (?)`
_Tweet_GetUserPostCount=`SELECT count(*) FROM @post WHERE user_id=? AND visibility IN (?)`
_Tweet_GetUserPostStar=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostStar=`SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.post_id = ? AND s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY P.ID DESC`
_Tweet_GetUserPostStarCount=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostStarCount=`SELECT count(*) FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) )`
_Tweet_GetUserPostStars=`SELECT * FROM @user WHERE username=?`
_Tweet_GetUserPostStars=`SELECT s.*, P.ID "post.id", P.user_id "post.user_id", P.comment_count "post.comment_count", P.collection_count "post.collection_count", P.upvote_count "post.upvote_count", P.share_count "post.share_count", P.visibility "post.visibility", P.is_top "post.is_top", P.is_essence "post.is_essence", P.is_lock "post.is_lock", P.latest_replied_on "post.latest_replied_on", P.tags "post.tags", P.attachment_price "post.attachment_price", P.ip "post.ip", P.ip_loc "post.ip_loc", P.is_del "post.is_del", P.created_on "post.created_on", P.modified_on "post.modified_on", P.deleted_on "post.deleted_on" FROM @post_star s JOIN @post P ON s.post_id = P.ID WHERE s.user_id = ? AND s.is_del = 0 AND ( visibility <> 1 OR ( visibility = 1 AND P.user_id = ? ) ) ORDER BY s.ID DESC, P.ID DESC LIMIT ? OFFSET ?`
_Tweet_GetUserPosts=`SELECT * FROM @post WHERE user_id=? AND visibility IN (?) ORDER BY latest_replies_on DESC LIMIT ? OFFSET ?`
_Tweet_GetUserPosts=`SELECT * FROM @post WHERE user_id=? AND visibility IN (?) ORDER BY latest_replies_on DESC LIMIT ? OFFSET ?`
_TweetHelpA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetHelpA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetHelp_GetPostContentByIds=`SELECT id, post_id, content, type, sort FROM @post_content WHERE post_id IN (?) AND is_del=0`
_TweetHelp_GetPostContentByIds=`SELECT id, post_id, content, type, sort FROM @post_content WHERE post_id IN (?) AND is_del=0`
_TweetHelp_GetUsersByIds=`SELECT id, username, nickname, status, avatar, is_admin FROM @user WHERE id IN (?) AND is_del=0`
_TweetHelp_GetUsersByIds=`SELECT id, username, nickname, status, avatar, is_admin FROM @user WHERE id IN (?) AND is_del=0`
_TweetManageA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetManageA_UserInfo=`SELECT * FROM @user WHERE username=?`
_TweetManage_AddPostStar=`INSERT INTO @post_star (post_id, user_id, created_on) VALUES (?, ?, ?)`
_TweetManage_AddPostStar=`INSERT INTO @post_star (post_id, user_id, created_on) VALUES (?, ?, ?)`
_TweetManage_DelPostById=`UPDATE @post SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_CommentIdsByPostId=`SELECT id FROM @comment WHERE post_id=? AND is_del=0`
_TweetManage_DelPostCollection=`UPDATE @post_collection SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_CommentMediaFromCommentIds=`SELECT content FROM @comment_content WHERE comment_id IN (?) AND type=3 AND is_del=0`
_TweetManage_DelPostStar=`UPDATE @post_star SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_DelCommentByPostId=`UPDATE @comment SET deleted_on=?, is_del=1 WHERE post_id=? AND is_del=0`
_TweetManage_LockPost=`UPDATE @post SET is_lock=1-is_lock, modified_on=? WHERE id=? AND is_del=0`
_TweetManage_DelCommentContentByCommentIds=`UPDATE @comment_content SET deleted_on=?, is_del=1 WHERE comment_id IN (?) AND is_del=0`
_TweetManage_MediaContentByPostId=`SELECT content FROM post_content WHERE post_id=? AND is_del=0 AND type IN (3, 4, 5, 7, 8)`
_TweetManage_DelPostById=`UPDATE @post SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_StickPost=`UPDATE @post SET is_top=1-is_top, modified_on=? WHERE id=? AND is_del=0`
_TweetManage_DelPostCollection=`UPDATE @post_collection SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_UpdatePost=`UPDATE @post SET comment_count=:comment_count, upvote_count=:upvote_count, collection_count=:collection_count, latest_replies_on=:latest_replies_on, modified_on=:modified_on WHERE id=:id AND is_del=0`
_TweetManage_DelPostStar=`UPDATE @post_star SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_VisiblePost=`UPDATE @post SET visibility=?, is_top=?, modified_on=? WHERE id=? AND is_del=0`
_TweetManage_DelReplyByCommentIds=`UPDATE @comment_reply SET deleted_on=?, is_del=1 WHERE comment_id IN (?) AND is_del=0`
_TweetManage_LockPost=`UPDATE @post SET is_lock=1-is_lock, modified_on=? WHERE id=? AND is_del=0`
_UserManage_GetAnyUsers=`SELECT * FROM @user WHERE is_del=0 ORDER BY id ASC limit 6`
_TweetManage_MediaContentByPostId=`SELECT content FROM post_content WHERE post_id=? AND is_del=0 AND type IN (3, 4, 5, 7, 8)`
_UserManage_GetUserById=`SELECT * FROM @user WHERE id=? AND is_del=0`
_TweetManage_StickPost=`UPDATE @post SET is_top=1-is_top, modified_on=? WHERE id=? AND is_del=0`
_UserManage_GetUserByPhone=`SELECT * FROM @user WHERE phone=? AND is_del=0`
_TweetManage_UpdatePost=`UPDATE @post SET comment_count=:comment_count, upvote_count=:upvote_count, collection_count=:collection_count, latest_replies_on=:latest_replies_on, modified_on=:modified_on WHERE id=:id AND is_del=0`
_UserManage_GetUserByUsername=`SELECT * FROM @user WHERE username=? AND is_del=0`
_TweetManage_VisiblePost=`UPDATE @post SET visibility=?, is_top=?, modified_on=? WHERE id=? AND is_del=0`
_UserManage_GetUsersByIds=`SELECT * FROM @user WHERE id IN (?) AND is_del=0`