-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGoToMap.php
More file actions
22 lines (22 loc) · 840 Bytes
/
Copy pathGoToMap.php
File metadata and controls
22 lines (22 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
//Link between the breed_detail.php and FinalMap.php page. Checks which breed is stored in the plzo_plz and joins the breed if necessary
include("connectDataBase.php");
include("FunctionsGenDiv.php");
if (isset($_POST[ 'breed_id' ])){
$breed_id = $_POST[ 'breed_id' ];
}
$dbh=db_connect();
//in the last_log: store the breed ID for which data are in the plzo_plz table
$sql_last_breed="SELECT db_breed from last_log";
$last_breed=pg_query($sql_last_breed);
if (pg_fetch_result($last_breed, 0,0)==$breed_id){
db_disconnect($dbh);
header("Location:FinalMap.php");
return;
}
else {
joinSQL($breed_id); //join using plz number between the table breedXX_inb_plz (list of plz with corresponding inbreeding,...) and the spatial layer plzo_plz (the one desplayed in the map)
db_disconnect($dbh);
header("Location:FinalMap.php");
}
?>