• 0 رای - 0 میانگین
  • 1
  • 2
  • 3
  • 4
  • 5
دلیل این اخطار چیه و چطور میتونم حل کنم
#1
SELECT codefard,class,(SELECT codefard,(sum(CASE
WHEN zarib>0 THEN nomre*zarib
ELSE 0
END)/sum(zarib)) as moadel FROM daneshjo GROUP BY codefard ORDER BY moadel DESC )as moadel,
IF(moadel=@_last_ave,@curRank:=@curRank,@curRank:=@_sequence) AS rank,
@_sequence:=@_sequence+1,@_last_ave:=moadel
FROM daneshjo, (SELECT @curRank := 1, @_sequence:=1, @_last_ave:=0)as r
ORDER BY moadel DESC




ولی این اخطار را میده:



SELECT codefard,class,(SELECT codefard,(sum(CASE
WHEN zarib>0 THEN nomre*zarib
ELSE 0
END)/sum(zarib)) as moadel FROM daneshjo GROUP BY codefard ORDER BY moadel DESC )as moadel,
IF(moadel=@_last_ave,@curRank:=@curRank,@curRank:=@_sequence) AS rank,
@_sequence:=@_sequence+1,@_last_ave:=moadel
FROM daneshjo, (SELECT @curRank := 1, @_sequence:=1, @_last_ave:=0)as r
ORDER BY moadel DESC LIMIT 0, 25
MySQL said: Documentation

#1241 - Operand should contain 1 column(s)
  پاسخ
تشکر شده توسط :


پرش به انجمن:


کاربران در حال بازدید این موضوع: 1 مهمان