In the mySQL table there is table_id, reception_date, patient_id, uid_document. Every doctor can take several patients every day. For example 2017.06.23 - 2 receptions, 2017.06.24 - 1 reception and so on.
On the page of the doctor you need to display it in the HTML table. Looking at this so that the accountant immediately knew how many receptions for each date at the doctor. In the form of date-number of receptions and all. What is the request to "write" for this? I'm doing this now
<?php $result100 = mysqli_query($con,"SELECT num, prdate, COUNT(*) FROM priem WHERE doctor_uid=$uidforfaq GROUP BY num, prdate ;") or die("<p>Не удается выбрать запись из базы данных</p>". mysqli_error($con)); $rowcount2 = mysqli_num_rows($result100); ?> Here is the num id of the table, the prdate date of admission But he gives me all the receptions for all the time. And it is necessary that it was DATE-NUMBER of RECEPTIONS .... Maybe for a date to make a separate request. Then I do not know how to explain mySQL so that it sorted by this date. In short, I can not figure anything out. Tell me please !
SELECT count(num) as cnt, prdate FROM priem WHERE doctor_uid=$uidforfaq GROUP BY prdate ;- Alexey ShimanskyGROUP BY DATE(prdate), ...- Akina