Mysqlphp can print a date with a ticket, but how can I display it by year?

Source: Internet
Author: User
Segmentfault. comq10... my ticket system has been able to print the date when there is a ticket, for example, 2016-06-062016-06-052016-06-032016-06-01, and can also display the total number of days {code ...} but how should I do it by year... sense of the SF master points of https://segmentfault.com/q/10...

My ticket system has been able to print a date with a ticket, for example
2016-06-06 2016-06-05 2016-06-03 2016-06-01

This format
It also shows the total number of days.

$DONE_ORDER = mysql_query("SELECT distinct buytime FROM `buy` "); while($DONE_ORDER_ROW = mysql_fetch_array($DONE_ORDER)){?>
   
  

But how can I show it by year?
For example

2016

2016-06-06 2016-06-05 2016-06-03 2016-06-01

2015

2015-04-06 2015-05-05 2015-03-03 2015-07-01

Reply content:

Sense of the SF master points of https://segmentfault.com/q/10...

My ticket system has been able to print a date with a ticket, for example
2016-06-06 2016-06-05 2016-06-03 2016-06-01

This format
It also shows the total number of days.

$DONE_ORDER = mysql_query("SELECT distinct buytime FROM `buy` "); while($DONE_ORDER_ROW = mysql_fetch_array($DONE_ORDER)){?>
   
  

But how can I show it by year?
For example

2016

2016-06-06 2016-06-05 2016-06-03 2016-06-01

2015

2015-04-06 2015-05-05 2015-03-03 2015-07-01

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.