A mysql-like php switch case statement.
Here is an example of group summation: select sum(redpackmoney) as stota,ischeck from t_redpack group by isCheck Use case when : select sum(redpackmoney) as stota, (CASE isCheck WHEN '1' THEN 'checktrue' WHEN '0' THEN 'uncheck' WHEN '-1' THEN 'checkfalse' ELSE 'unknow' END) as checkinfo from t_redpack group by isCheck In checkinfo, -1, 0, 1 are replaced with checkfalse, uncheck, checktrue (CASE WHEN performs string replacement processing) The above is a simple example of using the case when statement in MySQL. You may also be interested in:
|
<<: Vue implements simple data two-way binding
>>: How to start tomcat using jsvc (run as a normal user)
It is mainly the configuration jump of the if jud...
Table of contents Updatable Views Performance of ...
By default, /etc/default/docker configuration wil...
The vue part is as follows: <template> <...
1. Install mysql Run the following command to upd...
We all know that Docker containers are isolated f...
Table of contents Overview The role of reverse pr...
Table of contents 1. Basic use of axio 2. How to ...
1. Briefly describe the traditional LRU linked li...
The effect we need to achieve: What is needed The...
Table of contents 1. Introduction 1. Basic layout...
Table of contents Class component event binding F...
1. Introduction People who are not used to Englis...
Table of contents 1. Introduction 2. Analysis of ...
A vector wave <svg viewBox="0 0 560 20&qu...