$category Class Listing
  
 "; if (empty($startrow)) //if this is the first page and the first time we have seen it, make this the first page { $startrow=0; } // end if first page if (eregi("^[0-9]+$", $startrow)) //check that startrow variable is what we expect { //get matching classes from table with limit set to # desired to display on page $query2 = "SELECT * FROM $table_name where category=\"$category\" LIMIT $startrow, $display"; $result2 = mysql_query($query2); print ''; print '"; } // end display next link // end display links code while($row = mysql_fetch_array($result2)) { //while there are records, print them up to limit print ''; } // end print records print '"; } // end display links code if ($num_record < 1) // if there are no records { print "
See all Classes'; print '
'; // display links code if ($startrow != 0) //if this is not the first page show previous link { $prevrow = $startrow - $display; print "Previous "; } // end if not first page of listings $pages = intval($num_record / $display); if ($num_record % $display) // need to round up number of pages if modulus { $pages++; } //end if modulus if ($pages > 1) { // if there is more than one page of listings, run loop to display links for each page for ($i=1; $i <= $pages; $i++) { //start with one and loop through pages $nextrow = $display * ($i - 1); if ($startrow ==($display * ($i -1))) { // if this is the page we are on dont make a link print "$i  "; } else { // make a link print "$i  "; } // end checking if this is the page we are on } // end loop through pages } // end if there is more than one page of listings if (!((($startrow+$display) / $display) == $pages) && $pages != 1) { // if we are not at the last page, diplay the next link $nextrow = $startrow + $display; print "Next
Class Name:"; print $row['classname']; print ' 
Description:'; print $row['shortdesc']; print ' 
Hours:'; print $row['hours']; print ' Cost:$'; print $row['price']; print ' Per Student
Pre-requisites:'; print $row['prereq']; print ' 
Concentration:'; print $row['category']; print ' Training

'; // display links code see above for comments if ($startrow != 0) { $prevrow = $startrow - $display; print "Previous "; } $pages = intval($num_record / $display); if ($num_record % $display) { $pages++; } if ($pages > 1) { for ($i=1; $i <= $pages; $i++) { $nextrow = $display * ($i - 1); if ($startrow ==($display * ($i -1))) { print "$i  "; } else { print "$i  "; } } } if (!((($startrow+$display) / $display) == $pages) && $pages != 1) { $nextrow = $startrow + $display; print "Next
$XX
"; } // end if no records }else { //start row variable is bad print 'BAD DATA SUBMITTED'; } // end if start row variable bad }else { // category variable is bad print 'BAD DATA SUBMITTED'; }// end if category variable in url not what expected ?>

More Training Information

 
Web Design ] [ Graphic Design ] [ Placement ] [ Architectural Design ] [ Architectural Support ]
Rendering And Animation ] [ Training ] [ Portfolios ] [ About Us ] [ Home ] [ Log In ]
Computers in Design Inc.
A design technology consulting firm
611 Broadway Suite 726
New York, NY 10012
212-979-6015 212-979-6016
copyright 2001 Computers in Design Inc.
contact webmaster@computersindesign with any comments about this site