As shown below: //Query the year and month of the managefee_managefee table, and use the concat function to form year-month. For example, 2017 and 1 are combined to form 2017-01. . select CONCAT(a.year,'-',if(a.month<=9,CONCAT('0',a.month),a.month))as date,a.* from managefee_managefee as a; //Query the data in managefee_managefee with the time period from 2017-01 to 2017-07 select * from ( select CONCAT(a.year,'-',if(a.month<=9,CONCAT('0',a.month),a.month))as date,a.* from managefee_managefee as a ) b where b.date between '2017-01' and '2017-07'; The above article on how to use the concat function in MySQL is all I have to share with you. I hope it can give you a reference, and I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: JavaScript implements displaying a drop-down box when the mouse passes over it
>>: Docker Stack deployment method steps for web cluster
Overview There are many open source network monit...
Table of contents Conditional compilation Page La...
background: Tablespace: All INNODB data is stored...
Table of contents Nesting Parent-child component ...
Table of contents 1. ChildNodes attribute travers...
MySQL server has gone away issue in PHP 1. Backgr...
Hello everyone, today I want to share with you ho...
This article shares the summary of the JS mineswe...
The virtual machine I rented from a certain site ...
Install nginx Note that you must install nginx-fu...
Result:Implementation code: html <!-- Please h...
mysql-5.7.17-winx64 is the latest version of MySQ...
Add a DOCTYPE to the page Since different browser...
Table of contents Preface 1. bat executes js 2. T...
Copy code The code is as follows: li {width:300px...