for example :
command1 : select sum(B1) from company i.e total=10000
command2: select sum(B2) from company i.e total=6000
command3 : select sum(B3) from company i.e total=500
i want to store the total B1 into a variable X i.e X=10000
total B2 into a variable Y i.e Y=6000
total B3 into a variable Z i.e Z=5000
if(b2 and b3 =0)
{
make payment for b1
}
if(b1 and b3 =0)
{
make payment for b2
}
if(b1 and b2 =0)
{
Go to the complete details ...