Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. if( isset($_GET["state"]) {
  2. $where = $_GET['state'] == -1 ? "" : "state = '" . $_GET['state'] . "'";
  3. }
  4. if( isset($_GET["county"]) {
  5. $where .= $_GET['county'] == -1 ? "" : " AND county = '" . $_GET['county'] . "'";
  6. }
  7. // Variable editing should go before you use them.
  8.  
  9. $query = "Select DISTINCT Genus FROM Tennessee WHERE $where ORDER BY Genus";
  10. mysql_query($query);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement