I'm newbie and need help about PHP MySQL.

I have two tables:

Table1:

> 
> Home        | 
>  Work    | Sport    |Buy
>  YES|  BUY NO  
> ***\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_**  
> 
>  Television | Laptop  | 
>  shoes   |             |  
> 
>  DVD          |desk      |ball        |             |
> 
> 
> 
> 
> ---
> 
> 
> Table2:
> 
> 
> Items         | 
>  Buy    | 
>  Budget  
> ***\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_*\_*\_\_**  
> 
>  Television | YES   | 500  
>  Television | 
>  NO     | 5  
> 
>  Laptop      | YES   | 
>  400  
>  Laptop      | 
>  NO     | 3  
> 
>  shoes       | 
>  YES   | 80  
> 
>  shoes       | 
>  NO     | 1  
> 
>  DVD         | 
>  YES   | 60  
> 
>  DVD         | 
>  NO     | 2  
> 
>  desk        | 
>  YES   | 700  
> 
>  desk        | 
>  NO     | 1  
> 
>  ball          | 
>  YES   | 20  
> 
>  ball          | 
>  NO     | 1  
> 
> 
> 
> 

How can I get value from "Table2" and multiply each the value and store it in the next column in "Table1" ?

for example:

> 
> Buy YES = Television \* Laptop \* shoes
>  = 500\*400\*80
> 
> 
> Buy NO = Television \* Laptop \* shoes
>  = 5 \* 3 \* 1
> 
> 
> 

and also do to the next row. I wish you understand what I mean. 

Thanks for your help.