I'm trying to use recordset to create the following query:
$query_GetCurMonthPlayerGoals = "SELECT PlayerName, Goals FROM ( SELECT PlayerID, COUNT(*) AS Goals FROM Master WHERE TeamID=$row_GetTeamDetails['TeamID'] AND MONTH(GoalDate)=MONTH(CURDATE()) GROUP BY PlayerID ORDER BY Goals DESC ) T INNER JOIN Master_Players ON T.PlayerID=Master_Players.PlayerNameCode";
The problem I am having is that instead of;
I am getting;
How do I solve this?
The other thing I am wondering about is this line;
where I am wondering if this is the correct way to insert this PHP variable into the MySQL query?
Thanks in advance for any help offered.