I would like to sum totals for unknown values.
Here is the design
Course names are entered in separate table -- courses
If the course is still being tested the course status = open
This status is stored in the Course table. Each course name is unique
in this table.
Test information including test time is entered in a different table -- issues
The issues table includes the test time and course name values.
Several entries with the same course name will be made to this table
I would like to sum the total time tested based on Open courses.
First I would like to know how to select the correct courses from the issues database
based on the course_status in the courses databases.
Would the following statement work??
$query = "select issues.course_name, issues.time_tested from issues
where courses.course_status = 'open'";
$result = mysql_query( $query );
Then I need to sum the time_tested fields for all courses with the same name in the
issues database that were just selected as being Open.
I have been looking for some code that would do something similar to this.
If anyone can point me to code or has some thoughts I would appreciate.