-
Notifications
You must be signed in to change notification settings - Fork 0
/
RemoveSavedModels.php
38 lines (31 loc) · 1.34 KB
/
RemoveSavedModels.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
define('NOAUTHENTICATION',true);
include_once('../global.php');
global $dbh;
error_log($_POST['ModelIndex']);
error_log($_POST['RunNum']);
if ($_POST['ModelIndex'] == 0){
$result = pg_query_params($dbh,' delete from models.gwsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
if ($_POST['ModelIndex'] == 1){
$result = pg_query_params($dbh,' delete from models.ddsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
if ($_POST['ModelIndex'] == 2){
$result = pg_query_params($dbh,' delete from models.lddsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
if ($_POST['ModelIndex'] == 3){
$result = pg_query_params($dbh,' delete from models.llddsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
if ($_POST['ModelIndex'] == 4){
$result = pg_query_params($dbh,' delete from models.wddsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
if ($_POST['ModelIndex'] == 5){
$result = pg_query_params($dbh,' delete from models.tdrsaved where "RunNum" = $1 and user_id =$2 ', array($_POST['RunNum'],$_POST['user_id']));
pg_free_result($result);
}
?>