_TweetManage_DelPostCollection=`UPDATE @post_collection SET is_del=1, deleted_on=? WHERE id=? AND is_del=0`
_TweetManage_DelPostStar=`UPDATE @post_star SET is_del=1, deleted_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_HighlightPost=`UPDATE @post SET is_essence=1-is_essence WHERE id=? AND is_del=0`
_TweetManage_LockPost=`UPDATE @post SET is_lock=1-is_lock, modified_on=? WHERE id=? 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_PostHighlightStatus=`SELECT user_id, is_essence FROM @post 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_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_VisiblePost=`UPDATE @post SET visibility=?, is_top=?, modified_on=? WHERE id=? AND is_del=0`
_Tweet_UserCommentTweetsByFriend=`SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND (visibility=0 OR visibility=2) ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserCommentTweetsByGuest=`SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND visibility=0 ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserCommentTweetsBySelf=`SELECT * FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserCommentTweetsCountByFriend=`SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND (visibility=0 OR visibility=2)`
_Tweet_UserCommentTweetsCountByGuest=`SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=? AND visibility=0`
_Tweet_UserCommentTweetsCountBySelf=`SELECT count(*) FROM @post_by_comment WHERE is_del=0 AND comment_user_id=?`
_Tweet_UserMediaTweetsByFriend=`SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? AND (visibility=0 OR visibility=2) ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserMediaTweetsByGuest=`SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? AND visibility=0 ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserMediaTweetsBySelf=`SELECT * FROM @post_by_media WHERE is_del=0 AND user_id=? ORDER BY latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserMediaTweetsCountByFriend=`SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=? AND (visibility=0 OR visibility=2)`
_Tweet_UserMediaTweetsCountByGuest=`SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=? AND visibility=0`
_Tweet_UserMediaTweetsCountBySelf=`SELECT count(*) FROM @post_by_media WHERE is_del=0 AND user_id=?`
_Tweet_UserStarTweetsByAdmin=`SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? ORDER BY post.latest_replied_on DESC; LIMIT ? OFFSET ?`
_Tweet_UserStarTweetsByFriend=`SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility=0 OR post.visibility=2) ORDER BY post.latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserStarTweetsByGuest=`SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del = 0 AND star.user_id =? AND post.visibility = 0 ORDER BY post.latest_replied_on DESC LIMIT ? OFFSET ?`
_Tweet_UserStarTweetsBySelf=`SELECT star.*, post.ID "post.id", post.created_on "post.created_on", post.modified_on "post.modified_on", post.deleted_on "post.deleted_on", post.is_del "post.is_del", post.user_id "post.user_id", post.comment_count "post.comment_count", post.collection_count "post.collection_count", post.share_count "post.share_count", post.upvote_count "post.upvote_count", post.visibility "post.visibility", post.is_top "post.is_top", post.is_essence "post.is_essence", post.is_lock "post.is_lock", post.latest_replied_on "post.latest_replied_on", post.tags "post.tags", post.attachment_price "post.attachment_price", post.ip "post.ip", post.ip_loc "post.ip_loc" FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility<>0 (post.visibility=0 AND post.user_id=?)) ORDER BY post.latest_replied_on DESC; LIMIT ? OFFSET ?`
_Tweet_UserStarTweetsCountByAdmin=`SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=?`
_Tweet_UserStarTweetsCountByFriend=`SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility=0 OR post.visibility=2)`
_Tweet_UserStarTweetsCountByGuest=`SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND post.visibility=0`
_Tweet_UserStarTweetsCountBySelf=`SELECT count(*) FROM @post_star star JOIN @post post ON star.post_id = post.ID WHERE star.is_del=0 AND star.user_id=? AND (post.visibility<>0 (post.visibility=0 AND post.user_id=?))`