06-02-2008, 11:12 PM
|
#5 (permalink)
|
|
The Acquainted
Join Date: Apr 2008
Posts: 110
Thanks: 97
|
Thanks to all who replied...
Just to answer the question about the nature of the query and what I am trying to do, here goes:
I have a table that contains an "answer key" for a given test. There is a row for each test item. The fields in the table include, among others, "munit" (instructional unit for each math item).
The values in the field can vary widely from test-to-test, since not all math instr. units have to be represented on every test.
Thus, I executed a query that gave me, for this particular test, the "munits" that are represented on the test, as well as the number of items within each "munit". The query was:
SELECT munit, count(munit) AS mvar
FROM keytable
GROUP BY munit;
If I do a print_r, here are the array results (with no formatting):
Array ( [0] => 1 [1] => 4 ) Array ( [0] => 2 [1] => 19 ) Array ( [0] => 4 [1] => 18 ) Array ( [0] => 5 [1] => 5 ) Array ( [0] => 6 [1] => 7 ) Array ( [0] => 7 [1] => 19 ) Array ( [0] => 9 [1] => 6 )
So, when the test items are scored, I can compute the percent correct for each applicable "munit". Thus, I need a series of variables, such that...
$mUnit1 = 4, $mUnit2 = 19, etc...
Does this make sense? Again, I appreciate the help I've already received.
Thanks!
|
|
|
|