PHP MySQL grouping and ordering
You didn't need to hard-code season values like 1 and 2. Just use the nicely sorted repeating values from the rows and detect when the value changes from one row to the next.  With such a generic test, as shown below, you can use one loop and avoid repeated code.

Also note that you seemed to be using the wrong operator, !== the not-identical operator to do an equality test.

if (!($result = mysql_query("SELECT season_num, sub_season_num, esp_num, title, descrip FROM season ORDER BY season_num, sub_season_num", $link))) showerror();
$previous_season = 0; // start with nonsense value to force a heading
while ($row = mysql_fetch_array($result))
{
    $season = $row["season_num"]
    // Ignoring subseason in this version.
    // Decide whether to match both season and sub_season and
    // print both in a new header, complicating this `if` statement
    // OR have a separate, similar `if` statement and separate (sub)header
    // for subseasons. In the latter case, be sure to
    // reset previous_subseason to a nonsense value whenever season changes
    // Otherwise, a subseason header will be missing if a season happens to end
    // on the same subseason number (like 1) that the next season begins with.
    if ($season != $previous_season) {
        $echo "Season $season&lt;br&gt;";
        $previous_season = $season;
    }
    echo "Episode {$row["esp_num"]}&lt;br&gt;";
    echo "Title {$row["title"]}&lt;br&gt;";
    echo "Description {$row["descrip"]}&lt;br&gt;";
}