Hi if I want to use this query below select b.naam, b.voornaam,if(bu.typeid='2',bu.bedrag,0) as 'inkomst', if(bu.typeid='1',bu.bedrag,0) as 'uitgave',bu.datum,@total:= @total + if(bu.typeid=2,bu.bedrag,0) -if(bu.typeid=1,bu.bedrag,0) as 'totaal'from bewoners_uitgaven bujoin bewoners b on b.id = bu.bewonerIDjoin kl_bewoners_uitgave_type kl on kl.id = bu.typeidwhere b.Id =150;[/code]I got null as a result for totaal, can I use @var in my mysqlstatement?