How to count rows by date using MySQL and PHP

后端 未结 2 1395
既然无缘
既然无缘 2021-01-29 05:30

Well, I am developing Vote system where, i am selecting data from database using following code:

// Select info about vote
        $select_information = mysql_qu         


        
2条回答
  •  迷失自我
    2021-01-29 06:26

    Put comma between Date & COUNT(ID)

    $today_voting_query = "SELECT 
    DATE_FORMAT(STR_TO_DATE('$dbdate', '%d/%m/%Y' ), '%d/%m/%Y') as Date, 
    COUNT(ID) AS countID FROM `voteslist` WHERE `VoteID` = '$VoteID' AND `Date` = '$result_date';";
    

提交回复
热议问题