List:General Discussion« Previous MessageNext Message »
From:Dan Rossi Date:December 28 2005 5:39am
Subject:need help with user variables in where clause of sub query
View as plain text  
Hi there i am trying to use usewr variables in a select statement to 
add to a where clause in a sub query. Ie

select @id:=id,@month:=month, (select SUM(totals) from table where 
id=@id and month=@month) as totals from table

its happened on other occasions ie with calculations and sums, whats 
happened in mysql5 ? It used to work in mysql4 , something i am doing 
is wrong ? Please let me know thanks.

Thread
need help with user variables in where clause of sub queryDan Rossi28 Dec
  • Re: need help with user variables in where clause of sub querySGreen28 Dec
    • Re: need help with user variables in where clause of sub queryDan Rossi28 Dec
      • Re: need help with user variables in where clause of sub querySGreen28 Dec
        • Re: need help with user variables in where clause of sub queryDan Rossi29 Dec
        • Re: need help with user variables in where clause of sub queryDan Rossi29 Dec
          • Re: need help with user variables in where clause of sub queryDan Rossi29 Dec
            • Re: need help with user variables in where clause of sub querySGreen29 Dec
              • Re: need help with user variables in where clause of sub queryDan Rossi29 Dec
                • Re: need help with user variables in where clause of sub querySGreen29 Dec