php - codeigniter mysql sql query -


hello mysql query can output example , how can echo. need here's example..

                'table 1                 | id |date        |                 | 1  |01/01/2015  |                 | 2  |01/02/2015  |                 | 3  |01/01/2015  |                 | 4  |01/02/2015  |                   'table 2                 |id |table1_id| value1| value2|                  | 1 |   1     |  5    |    2  |                 | 2 |   2     |  40   |    3  |                 | 3 |   3     |   5   |    2  |                 | 4 |   4     |       |    4  |  

output must

          $value_total = value1 * value2;            if(value1 == ''){            }else{            $value_total = value1 * value2;            } 

here's final output. add same date

         date           value          01/01/2015     20          01/02/2015     120 

try this

      if(!empty(value1){        $value_total = value1 * value2;        } 

Comments

Popular posts from this blog

qt - Using float or double for own QML classes -

Create Outlook appointment via C# .Net -

ios - Swift Array Resetting Itself -