1,105,447 Community Members

Dreamweaver Recordset issue

Member Avatar
Tinnin
Posting Whiz in Training
218 posts since Jul 2012
Reputation Points: 8 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 2 [?]
 
0
 

Hi all,

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;

$row_GetCurMonthPlayerGoals['PlayerName']
$row_GetCurMonthPlayerGoals['Goals']

I am getting;

$row_GetCurMonthPlayerGoals['PlayerID']
$row_GetCurMonthPlayerGoals['Goals']

How do I solve this?

The other thing I am wondering about is this line;

WHERE TeamID=$row_GetTeamDetails['TeamID']

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.

Member Avatar
Tinnin
Posting Whiz in Training
218 posts since Jul 2012
Reputation Points: 8 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 2 [?]
 
0
 

Igonore the first part of my problem. I'm being an idiot.

Member Avatar
JorgeM
IT Addict
6,414 posts since Dec 2011
Reputation Points: 581 [?]
Q&As Helped to Solve: 963 [?]
Skill Endorsements: 172 [?]
Moderator
Featured
Sponsor
 
0
 

So, do you still need help with this question or did you resolve your issue?

Member Avatar
Tinnin
Posting Whiz in Training
218 posts since Jul 2012
Reputation Points: 8 [?]
Q&As Helped to Solve: 4 [?]
Skill Endorsements: 2 [?]
 
0
 

Both now resolved. Thanks.

Question Answered as of 1 Year Ago by JorgeM
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article