Query sql for some common functions

1. Scenario: Query a player’s ranking and how many votes away from the previous one Method 2 (remove reordering and query the number less than yourself) $temp = DB::fetch_first(“SELECT distinct total+jewel_vote+forge_vote ,COUNT(*)+1 AS RANK FROM " . DB::table(‘vote_competition’) .” WHERE total+jewel_vote+forge_vote>" . $competition[‘all’] . " and aid={$aid} ORDER by forge_vote desc"); $rank = $temp[‘RANK’]; Unable to directly query the votes of the previous contestant if ($temp[’total+jewel_vote+forge_vote’]) { //What is queried here is the number of votes different from the first contestant. $up = $temp[’total+jewel_vote+forge_vote’]-$competition[‘all’]; } ...

April 10, 2019 · 5 min · MoeJue

WeChat authorized login

Documentation: https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421135319 The authorized login of WeChat is similar to the authorized login of QQ, Sina and other platforms, and both adopt the OauthOAuth2.0 authentication method. There are two types of WeChat authorization: Silent authorization Pop-up authorization requires manual consent from the user. Explanation of the differences between the two scopes Web page authorization initiated with snsapi_base as the scope is used to obtain the openid of the user who enters the page, and is authorized silently and automatically jumps to the callback page. What the user perceives is that they directly enter the callback page (often a business page) Web page authorization initiated with snsapi_userinfo as the scope is used to obtain the user’s basic information. However, this kind of authorization requires the user to manually agree, and since the user has agreed, there is no need to pay attention, and the user’s basic information can be obtained after authorization. The “Interface for Obtaining User Basic Information” in the user management interface can obtain the user’s basic information based on the user’s OpenID only after the user interacts with the public account through messages or after the follow-up event is pushed. This interface, including other WeChat interfaces, requires the user (i.e. openid) to follow the official account before it can be called successfully. ...

April 5, 2019 · 6 min · MoeJue

WeChat JSAPI payment

I have been doing business related to WeChat some time ago. Although it is not a new technology, I have never had the opportunity to come into contact with it before. Then I stepped on some pitfalls and took the time to organize and record it. There are 7 types of WeChat payment, including: payment code payment, JSAPI payment, Native payment, APP payment, H5 payment, mini program payment, and face payment. WeChat JSAPI payment is used in this business: the user enters the merchant’s H5 page by scanning the QR code on WeChat, following the official account, etc., and calls JSSDK within WeChat to complete the payment. ...

March 30, 2019 · 7 min · MoeJue

Unboxing of Domestic Evil God Figures

**“Evil God” is used to describe these figurines with ridiculously broken expressions and outrageous details. ** Speaking of “evil gods”, the first thing everyone may think of is the “four evil sisters”. In fact, they are all existences that people worship. The reputation of the four evil gods has been passed down forever. They can not only ward off evil spirits, but also have a very long face. Are they powerful weapons that can kill people without blood? ...

March 14, 2019 · 2 min · MoeJue

Now that's a dove.

It’s over, it’s over, it’s really pigeonholed, last month’s year-end summary was still boasting about my diligence in posting blogs every month last year, yet the flag is really meant to be broken. Actually, it’s not too pigeonholed (is there such a thing???). Black question mark), today is actually February 29th (forced redemption) La-la-la-la-la~~~ Well, in fact, the pigeon’s reason is mainly because of the busy work, tonight is also hard to not overtime, can code blog, usually daytime work is very tired, off work want to rest, simply do not have that mind to conceptualize the blog, have to understand have to understand. To ask what I work, IT industry, now in an Internet company as a programmer, full-stack engineer (laughs), so overtime is a common thing, you know! ...

March 1, 2019 · 2 min · MoeJue

Xiaomi 8 Youth Edition unboxing

Xiaomi 8 Youth Edition 6G + 64G (I may only be a rice fan in this life) The original price is 1699, the New Year’s Day discount is 200, and you get 1499 will be shipped the next day after placing the order, one day of transportation, and the goods will arrive on the third day. I also got a Mi Fan card. I may not be able to use the 6.26-inch 19:9 full screen 2280 x 1080 FHD+, 403 PPI, 1500:1 contrast ratio Snapdragon 660 AIE eight-core processor, maximum frequency 2.2GHz Adreno 512 graphics processor, maximum frequency 650 MHz Some people may say that I bought a 64G card that was too small. My previous Xiaomi only had a 32G card and it was not used up after two years of use. After buying it, I discovered that the Xiaomi Mi 8 also supports external SD cards. It is enough to plug in my 32G SD card. As long as it is enough, why waste money on buying big memory… ...

January 25, 2019 · 2 min · MoeJue

I seem to have lost a friend

Someone said: Finishing the supplement is like losing a good friend. Yes, when watching the show, everyone will pour in their emotions and put themselves into the second dimension. Even if they are just “spectators”, we are witnessing everything that happens in the second dimension: The partners we keep getting to know and understand, the things we face together, happiness, joy, sadness, doubt, sorrow, sorrow, anger, bitterness, are all the memories we share with our partners in the second dimension. When it comes to the end, those unforgettable people and things will have to say goodbye to us. This is truly a separation of life and death, and we may never see each other again. But, everyone did not disappear. They have not left. The bond we have formed has brought us closer together - yes, they have conveyed their thoughts to us and will stay in our memories forever. They have not left. They have always been by our side, encouraging us and helping us, all the time. They may belong to the past, but they have already become our strength, encouraging us and helping us to look forward and move forward on the road of life, to embrace the future and embrace beautiful things. By then, we will definitely meet partners like them again, giving us unforgettable memories again. Then we continued to move forward with the same feeling of gratitude and full of energy. Without them, I don’t think we could have done it. I think this is the meaning of every unforgettable good show. Again, Minnasang, さよなら, ありがと.

January 17, 2019 · 2 min · MoeJue

I thought I was going to be rich, but I wasn't.

2018 has come to an end The wish to become rich suddenly failed What’s even worse is that we have to complete an annual masterpiece ——Year-end summary Speaking of which, there is no year-end summary in this world. Since there are KPIs There is endless resentment The following is the text In Article Archive you can clearly see all the articles and the time they were published. There are articles published every month in 2018, and I come here to take a look almost every day. ...

January 2, 2019 · 3 min · MoeJue

When did you first enter the second dimension?

When did you first enter the second dimension? Maybe it’s an attractive anime, a handsome and beautiful character, maybe it’s an inadvertent glance, maybe it’s a strong recommendation from a friend, Many, many, maybe, The only thing that remains unchanged is the joy I felt when I saw it, as if my life was filled with colors. It’s like an angel’s door is opening. I once watched a TV series late at night and hypnotized myself by saying that I would fall asleep after watching this episode. I used to canvass for votes for my favorite characters, I used to save my lunch money and use it to spend money and buy figurines. Counting the days until you get it. once cried over a certain plot, I burst into tears over a story that had nothing to do with me, And I was excited for the protagonist’s rise, It’s like fighting with them in an illusory time and space. In the past, all the mobile phone wallpapers were of a favorite character, and the QQ signatures were all what they said. I once watched the laughter and slapstick in the anime alone in bed, and I giggled silently along with it. I once couldn’t let go of a certain series after watching it. There is a sense of loss that comes from being left empty. Spending countless days and nights using animation to accompany my youth, Use the two-dimensional torch to dispel loneliness. With their company, My youth would not have been so helpless and confused. I once chatted in a QQ group until dawn, It was once said that chuunibyou will never end. I don’t know your names, I don’t know what role you play in reality. I don’t know if you are feeling down at this time, But at this time, even though we are separated by thousands of mountains and rivers, It’s like being close at hand. We once joked that Naruto would never become Hokage. But he finally put on the seventh generation’s fiery red shirt. We once said that we will have no regrets about entering the second dimension in this life. But there are always people who leave silently and say goodbye. On the way forward, it is difficult to reach the same destination by different paths. One day we will clear out the anime pictures on our phones and forget about our youth. One day, we will also go to the battlefield of life, Bury the loneliness and helplessness of the past. Natsume’s friend account has not been cleared yet. Kudo Shinichi has not yet been able to say I love you to Xiaolan, The mythical Holy Grail War is not over yet, Si and Ella have not yet been able to meet again. Tachibana Kanade has not yet met Otonashi Yuzuru, That baseball has not yet broken through the girl’s window, It’s not yet the summer when I see Mianma again ten years later, The young man has not yet stood in the gorgeous concert hall, Pay tribute to that girl with a peerless concerto. The heroes are still fighting for that distant ideal city, On the other side of freedom, mankind has not yet broken through that high wall. …We once shone brightly and were as arrogant as emperors, He once lived on the streets like a bereaved dog. I once had a family full of brothers and thousands of troops, I also fought alone in a blizzard. As long as I can do it one night Suddenly I remembered those helpless years, Unintentionally opened the door to the second dimension, Found the only light to move forward. That’s enough

December 24, 2018 · 3 min · MoeJue

Xiaomi laptop 15.6 unboxing

Learn from the big guys’ blog and play unboxing (:- Recently I went to Shiheyuan, so I didn’t have much time to update the blog. I think it will be like this in the next period of time. I didn’t even update my computer. So, I took advantage of the chaos and bought a laptop to use There happened to be a bargain some time ago, so I spent my life savings to buy a Xiaomi laptop. (Actually, I should be a rice fan Then it arrived the next night. (Express delivery is really slow (:-laughs Frontal photo Pre-installed genuine Windows 10 system, office home and student edition Packed tightly Product manual and charger (so empty Space gray, I originally wanted to buy silver, but unfortunately it was out of stock. There is no logo design on the surface. You can put Apple’s logo on it (:laughs. Of course I won’t do that. It would be like this if you ask me. It is equipped with seven major interfaces, including a three-in-one card reader, USB 2.0, Gigabit Ethernet port, HDMI interface, two USB 3.0, and headset jack, so it is not very thin. Xiao Ai will guide you through the entire activation process and supports voice input. Has a small keyboard design After dozens of minutes, you will be on the desktop. If nothing else, let’s change the wallpaper and put it up first. ...

November 25, 2018 · 2 min · MoeJue