[flexcoders] group data in flex list

1 view
Skip to first unread message

stinasius@yahoo.com [flexcoders]

unread,
Mar 28, 2015, 9:48:39 AM3/28/15
to flexc...@yahoogroups.com
 

Hello guys i have the following tables; biodata[biodata_id, f_name, l_name, o_name, team], collections[collections_id, ID_biodata, amountPaid, amountExpected, balance, quater, datePaid].

There are 5 teams each with 4 members. i would like to generate a list in flex to show how much each member has paid and to display the data by showing only 5 teams and members in each team under the team name.

i have the following query but i get errors. could someone please help me.

<cffunction name="getTeams" output="false" access="remote" returntype="query">
<cfset var qteams = "" />
        <cfset var result= "">
                
        <cfquery datasource="bond100" name="qteams">
        SELECT biodata_id, f_name + ' ' + l_name AS fullname, o_name, team, collections_id, ID_biodata, amountPaid, amountExpected, balance, datePaid
            FROM biodata, collections
            WHERE biodata_id = ID_biodata         
        </cfquery>  
        
        <cfquery dbtype="query" name="results">
        SELECT team, fullname, amountPaid, amountExpected, balance, datePaid
            FROM qteams 
            GROUP BY team          
        </cfquery>       
        
        <cfreturn results/>
</cffunction>

the error i get is "The column qteams.fullname is invalid in the SELECT list clause because it is not contained in either an aggregate function or the GROUP BY clause."

__._,_.___

Posted by: stin...@yahoo.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (1)

.

__,_._,___
Reply all
Reply to author
Forward
0 new messages