[thelist] Getting Specific Numbers from mySQL Database Using PHP

Daniel Padolsky padolsky at gmail.com
Sat Sep 6 03:21:10 CDT 2008


Okay, I'm new to the list, so I apologize if this subject has been broached
already or if it doesn't make sense. I have a mySQL database that holds a
list of tests taken by users from various companies, and I want to retrieve
data for certain tests for certain companies to summarize their results for
that test. For example, if users from company A (amongst other companies)
takes tests 1, 2 and 3 and I want to find out their results for all three
tests and list those results, how do I do this? I want it done dynamically
so that if I enter the name of the company I get a list stating that company
A got 45 problems correct on test #1, 50 problems correct on test #2, and 60
problems on test #3.. I can do all of the other things. I can find out which
tests tests company A has taken (tests 1, 2 and 3); I can find the total
answers correct for all three tests for company A (155); I can get their
average percentages for all of their tests combined, but I can't seem to
figure out how to do it for a specific test and then list those tests. I've
looked into all of the different array functions but I can't seem to find
one that fits this situation. I even found your discussion on creating
dynamic variables, but am not sure how that would help. Dan   



More information about the thelist mailing list