Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

php mysql select current month

mysql> select date(date_joined),count(*) from users
       where MONTH(date_joined)=MONTH(now())
       and YEAR(date_joined)=YEAR(now())
       group by date(date_joined);
+-------------------+----------+
| date(date_joined) | count(*) |
+-------------------+----------+
| 2020-05-01        |        3 |
| 2020-05-04        |        6 |
| 2020-05-05        |        4 |
| 2020-05-06        |        2 |
+-------------------+----------+
Source by ubiq.co #
 
PREVIOUS NEXT
Tagged: #php #mysql #select #current #month
ADD COMMENT
Topic
Name
5+6 =