Location: PHPKode > projects > NOLA > invitemcatlst.php
<? include('includes/main.php'); ?>
<? //invitemcatlst.php
     echo texttitle('Item Category List');
     $recordSet = &$conn->Execute('select name,seasonname1,seasonname2,seasonname3,seasonname4,seasonbegin1,seasonbegin2,seasonbegin3,seasonbegin4,seasonend1,seasonend2,seasonend3,seasonend4 from itemcategory order by name');
     if ($recordSet->EOF) die(texterror('No item categories found.'));
     echo '<table border=1><tr><th rowspan="2">Category Name</th><th colspan=3>Season One</th><th colspan=3>Season Two</th><th colspan=3>Season Three</th><th colspan=3>Season Four</th></tr>';
     echo '<tr><th>Name</th><th>Begin Month</th><th>End Month</th><th>Name</th><th>Begin Month</th><th>End Month</th><th>Name</th><th>Begin Month</th><th>End Month</th><th>Name</th><th>Begin Month</th><th>End Month</th></tr>';
     while (!$recordSet->EOF) {
                    $name=$recordSet->fields[0];
                    $seasonname1=$recordSet->fields[1];
                    $seasonname2=$recordSet->fields[2];
                    $seasonname3=$recordSet->fields[3];
                    $seasonname4=$recordSet->fields[4];
                    $seasonbegin1=num2month($recordSet->fields[5]);
                    $seasonbegin2=num2month($recordSet->fields[6]);
                    $seasonbegin3=num2month($recordSet->fields[7]);
                    $seasonbegin4=num2month($recordSet->fields[8]);
                    $seasonend1=num2month($recordSet->fields[9]);
                    $seasonend2=num2month($recordSet->fields[10]);
                    $seasonend3=num2month($recordSet->fields[11]);
                    $seasonend4=num2month($recordSet->fields[12]);
                    echo '<tr><td><b>'.$name.'</b></td><td>'.$seasonname1.'</td><td>'.$seasonbegin1.'</td><td>'.$seasonend1.'</td><td>'.$seasonname2.'</td><td>'.$seasonbegin2.'</td><td>'.$seasonend2.'</td><td>'.$seasonname3.'</td><td>'.$seasonbegin3.'</td><td>'.$seasonend3.'</td><td>'.$seasonname4.'</td><td>'.$seasonbegin4.'</td><td>'.$seasonend4.'</td></tr>';
                    $recordSet->MoveNext();
     };
     echo '</table>';

?>
<? include('includes/footer.php'); ?>
Return current item: NOLA