By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,952 Members | 1,732 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,952 IT Pros & Developers. It's quick & easy.

code problem

P: 10
Hi guys

i have 2 problem

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]

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

[HTML]select, e.salario, a.total_adv, m.total_miss*22.00, x.total_extra, e.salario+x.total_extra-(a.total_adv+m.total_miss*22.00) 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=mysql_result($result,$i,"m.total_miss* 22.00");[/HTML]


Danylo Iamaguchi
May 21 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.