code problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • parallax
    New Member
    • Apr 2007
    • 10

    code problem

    Hi guys

    i have 2 problem

    first,
    how could i create this view as a decimal on the total_miss field

    [HTML]CREATE VIEW miss AS SELECT name, SUM(missing) AS total_miss FROM data where month (date) = 04 group by name;[/HTML]

    second,
    when i'm in the mysql's shell this line works well, but i could make the the php's code...

    [HTML]select e.name, e.salario, a.total_adv, m.total_miss*22 .00, x.total_extra, e.salario+x.tot al_extra-(a.total_adv+m. total_miss*22.0 0) from empregados as e natural left JOIN adv as a natural left JOIN miss as m natural left join extra as x group by name;[/HTML]

    this is how i'm trying to call the result
    [HTML]$total_miss=mys ql_result($resu lt,$i,"m.total_ miss*22.00");[/HTML]

    thanks


    Danylo Iamaguchi
Working...