I was hoping someone could point me in the right direction.
What I have is a MySQL database that looks like this:
ID Employee Welds Fail Repair
1 10 5 0 0
2 53 10 0 0
3 10 0 3 0
4 22 0 0 3
5 53 3 0 0
6 244 0 0 8
my list at this point goes on and on, basically we check the welds that our employees do. How many, then they get inspected and we track how many failed and who repaired how many
what I need at this point is totals per employee and as a whole, I'm sure I can figure out how to add everything together to get total welds, fails and repairs, but what I'm unsure about is how to go about adding just the records where the employee is the same. Can I do this with one sql query that gives me all the data and add from there or should I do a query per employee? how would I do that when I don't want to script a query for every employee.
Thank you in advance
Adding multiple records
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Adding multiple records
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Adding multiple records
the forum omits multiple spaces in a row, I hope the table I tried to show is understandable.
"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Adding multiple records
Code: Select all
SELECT employee, SUM(weldqt) FROM cjp GROUP BY employee

"Det bästa stället att hitta en hjälpande hand är i slutet av din egen arm" förutom här
Re: Adding multiple records
Hi DavJans,
Really like this "Real World" application of liveCode
I don't think that an example of a liveCode product needs to be a killer app, would you consider writing a paragraph and posting a pic of it here:
http://livecode1001.blogspot.com/
Even if you are using drag n' drop controls and it doesn't look pretty it still is a meaningful application.
Simon
Really like this "Real World" application of liveCode

I don't think that an example of a liveCode product needs to be a killer app, would you consider writing a paragraph and posting a pic of it here:
http://livecode1001.blogspot.com/
Even if you are using drag n' drop controls and it doesn't look pretty it still is a meaningful application.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!