4 || $quadrat <=0)) { $quadrat = 1; } $month = $HTTP_GET_VARS['m']; switch($month){ case("apr"): $monthNum = 4; $monthName = "April"; break; case("may"): $monthNum = 5; $monthName = "May"; break; case("jun"): $monthNum = 6; $monthName = "June"; break; case("jul"): $monthNum = 7; $monthName = "July"; break; case("aug"): $monthNum = 8; $monthName = "August"; break; case("sep"): $monthNum = 9; $monthName = "September"; break; case("oct"): $monthNum = 10; $monthName = "October"; break; default: $monthNum=""; } //can't get nested inner join query to work //$select = "select distinct(sl.namecommon), sl.speciesid, sl.namescientific, sl.genus, i.filename, i.imglocation, avg(sd.coverage) as cover"; //$from = "from (lcll_specieslist sl inner join ((lcll_quadrat q inner join lcll_samples s on q.id = s.quadrat) inner join lcll_sampledetail sd on s.sampleid = sd.mastersampleid) on sl.speciesid = sd.speciesid) left join lcll_images i on (sl.characterimage = i.imageid)"; //$where = "where s.quadrat=$quadrat"; //$orderby = "order by namecommon"; //and can't get this query to pull species without characteristic images.... so i'm adding an extra query to get the characteristic image FOR EACH species (bad bad). //$select = "select distinct(sl.namecommon), sl.speciesid, sl.namescientific, sl.genus, i.filename, i.imglocation"; //$from = "from lcll_specieslist sl, lcll_quadrat q, lcll_samples s, lcll_sampledetail sd, lcll_images i"; //$where = "where s.sampleid = sd.mastersampleid and q.id = s.quadrat and sl.speciesid = sd.speciesid and s.quadrat=$quadrat and (sl.characterimage = i.imageid or sl.characterimage = null or sl.characterimage = '')"; //$orderby = "order by namecommon"; $select = "select distinct(sl.namecommon), sl.speciesid, sl.namescientific, sl.genus, avg(sd.coverage) as cover"; $from = "from lcll_specieslist sl, lcll_quadrat q, lcll_samples s, lcll_sampledetail sd"; $where = "where s.sampleid = sd.mastersampleid and q.id = s.quadrat and sl.speciesid = sd.speciesid and s.quadrat=$quadrat"; $orderby = "order by namecommon"; $groupby = "group by namecommon"; //if displaying list for a specific month if(!empty($monthNum)){ $where = "$where and month(sampledate) = $monthNum"; } $query = "$select $from $where $groupby $orderby"; $result = mysql_query($query) or die ("Error in query: $query.\n" . mysql_error()); $numRows = mysql_numrows($result); //dumpQuery("liver", $numRows,true); ?> Virtual Prairie Quadrats [Landscape Change/Landscape Loss]

select a quadrat:

quadrat selection map

Instructions:

To view a plant species herbarium record, click 'herbarium'.

Quadrat     Species list

0){ while($row = mysql_fetch_object($result)){ $speciesid = $row->speciesid; $speciesName = $row->namecommon." (".$row->genus." ".$row->namescientific.")"; $cover = round($row->cover,1); //extra query to pick-up characteristic image (bad) $imgQuery = "select i.filename, i.imglocation from lcll_images i, lcll_specieslist s where s.speciesid = $speciesid and s.characterimage = i.imageid"; $imgResult = mysql_query($imgQuery) or die ("Error in query: $query.\n" . mysql_error()); $imgNumRows = mysql_numrows($imgResult); if($imgNumRows == 1){ $imgRow = mysql_fetch_object($imgResult); $imagePath = $imageRoot.cWEbPath($imgRow->imglocation)."t_".$imgRow->filename; } else { $imagePath = "images/noimage.gif"; } echo("
\n"); echo("\"$speciesName\"/\n"); echo("

$speciesName
"); echo("$cover % avg. cover
"); echo("herbarium

\n"); echo("
\n\n"); } } else { echo("no identifiable species found in the quadrat during this period."); } ?>
scroll up
scroll down

crocuses still blossom in numbers."); break; case(2): echo("This quadrat lies adjacent to a large housing development. Unfortunately, a number of invasive species including Kentucky bluegrass, leafy spurge and Canada thistle have set seed in this area. Diligent hand-pulling of these invasive species has kept them in control, allowing a number of native species to thrive including white cinquefoil and white prairie clover."); break; case(3): echo("Quadrat 3 is situated in an area which has benefited from the effects of a recent controlled burn. From out of the May ashes flourish the delicate purple flowers of the ground plum. As July approaches August, the striking yellow of the beautiful sunflower is replaced by the vibrant golden blooms of Canada goldenrod. By season end, the area is set ablaze with the reddish hue of big bluestem."); break; case(4): echo("This quadrat lies in an area which was once a common roadway. Fortunately, a number of native species survived the disturbance, having blown in from adjacent areas or awakening from a long dormancy in the seed bank. Although considerable litter is present in the area, a number of native species have managed to thrive including purple prairie clover and low prairie rose."); break; } ?>