forked from NYCPlanning/edm-metadata-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdd_edit_submission.php
More file actions
38 lines (29 loc) · 1.11 KB
/
dd_edit_submission.php
File metadata and controls
38 lines (29 loc) · 1.11 KB
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
38
<?php
// Editing row in data dictionary
if(isset($_GET['save-submit'])) {
$id = $_GET['s0'];
$sde = $_GET['sde_table'];
$sql = "UPDATE $sde
SET orders = '" . $_GET['s1'] . "',
field_name = '" . $_GET['s2'] . "',
longform_name = '" . $_GET['s3'] . "',
description = '" . $_GET['s4'] . "',
geocoded = '" . $_GET['s5'] . "',
required = '" . $_GET['s6']. "',
data_type = '" . $_GET['s7'] . "',
expected_allowed_values = '" . $_GET['s8'] . "',
last_modified_date = '" . $_GET['s9'] . "',
no_longer_in_use = '" . $_GET['s10'] . "',
notes = '" . $_GET['s11'] . "'
WHERE uid = $id ";
pg_query($sql);
}
// add new row in data dictionary
$uid_focus;
if(isset($_GET['add_row'])) {
$sde = $_GET['sde_table'];
$sql_add = "INSERT INTO $sde (orders,field_name,longform_name,description,geocoded,required,data_type,expected_allowed_values,last_modified_date,no_longer_in_use,notes)
VALUES ('','','','','','','','','','','')";
pg_query($sql_add);
}
?>