123456789101112131415161718192021 |
- <?php
- include 'con.php';
- //error handling
- ini_set('display_errors', 1);
- error_reporting(E_ALL);
- $action = $_POST['action'];
- $sql1 = "SELECT ACTION_ID FROM DTC_ACTION WHERE NAME_DE = '{$action}'";
- $actionID = sqlStm($sql1)['ACTION_ID'][0];
- $toolPart = $_POST['toolPart'];
- $sql2 = "SELECT TOOLPART_ID FROM DTC_TOOLPART WHERE NAME_DE = '{$toolPart}'";
- $toolPartID = sqlStm($sql2)['TOOLPART_ID'][0];
- $request = 1;
- $curr_time = date("d.m.Y h:i:s");
- $sql = "INSERT INTO DTC_TOOL_LC_EVENT (TLC_EVENT_ID,DATE_TIME,TOOL_ID,ACTION_ID,ARTICLE_ID,WORKER_ID,PRODUCTION_ORDER_ID,MACHINE_ID,COMMENTS,PRODUCED_QUANTITY,TOOLPART_ID,REQUEST) VALUES (LCSEQ.NEXTVAL,TO_TIMESTAMP('{$curr_time}','DD.MM.YYYY HH:MI:SS'),'{$_POST['toolID']}','{$actionID}','{$_POST['articleID']}','{$_POST['workerID']}','{$_POST['orderID']}','{$_POST['machineID']}','{$_POST['comment']}','{$_POST['quantity']}','{$toolPartID}','{$request}')";
- $res = sqlStm($sql);
- ?>
|