Well, I am developing Vote system where, i am selecting data from database using following code:
// Select info about vote
$select_information = mysql_qu
You forgot a comma between the fields in your select
statement.
Please change
DATE_FORMAT(STR_TO_DATE('$dbdate', '%d/%m/%Y' ), '%d/%m/%Y') as Date COUNT(`ID`)
to
DATE_FORMAT(STR_TO_DATE('$dbdate', '%d/%m/%Y' ), '%d/%m/%Y') as Date, COUNT(`ID`)
You should also change $today_voting[0];
to $today_voting[1];
because the voting count is the second column you are selecting. The first column ($today_voting[0]
) contains the formatted date.
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';";