// Gather the information required for the search include ("../../../../Connections/connSMori.php"); mysql_select_db($database, $bat_plants_connection); $plant_family_to_search = "%"; $plant_genus_to_search = "%"; $plant_epithet_to_search = "%"; $start_row = 0; if ($_GET['textPlantFamily'] != "") $plant_family_to_search = $_GET['textPlantFamily']; if ($_GET['textPlantGenus'] != "") $plant_genus_to_search = $_GET['textPlantGenus']; if ($_GET['textPlantEpithet'] != "") $plant_epithet_to_search = $_GET['textPlantEpithet']; if ($_GET['textRow'] != "") $start_row = $_GET['textRow']; // Cleanup the query parameters $tmp_plant_family_to_search = str_replace("'","''",$plant_family_to_search); $tmp_plant_genus_to_search = str_replace("'","''",$plant_genus_to_search); $tmp_plant_epithet_to_search = str_replace("'","''",$plant_epithet_to_search); // Create and perform the query $query = "SELECT * FROM batplant WHERE (PlantFamily LIKE '" . $tmp_plant_family_to_search . "' AND PlantGenus LIKE '" . $tmp_plant_genus_to_search . "' AND PlantEpithet LIKE '" . $tmp_plant_epithet_to_search . "') ORDER BY PlantFamily, " . "PlantGenus, PlantSpecies, BatGenus, BatSpecies"; $query_results = mysql_query($query, $bat_plants_connection); if (!$query_results) { die ('Query: ' . $query . '\nInvalid query:' . mysql_error ()); } $total_number_of_rows = mysql_num_rows($query_results); $final_row_counter = $row_counter = $total_number_of_rows; if ($total_number_of_rows > $start_row + 1) { if (!mysql_data_seek ($query_results, $start_row)) die ('Unexpected problem. Contact the administrator.'); } ?>
Database of Neotropical Bat/Plant Interactions Plant Search Results
Return
to Plant Search
Return
to Plant Search |