How would I retrieve the information without calling multiple fetches?
for ($course_period=1; $course_period<=4; $course_period++) {
$result = mysql_query("SELECT * FROM courses WHERE id=".$course[$course_period]["id"]);
while ($row = mysql_fetch_array($result)) {
$course[$course_period]["name"] = $row["course_name"];
}
}
I know this is disgustingly inefficient and would like some help on revising it. I would just like to have the name pulled from other table where ID=?? (EX 1, 2, 6, and 320).
Is this the only way?
Try this: