From afc4b10368047a11bcfe8b9932b9160fb8e8d03d Mon Sep 17 00:00:00 2001 From: starthomas610 Date: Fri, 14 Jun 2024 05:18:32 -0400 Subject: [PATCH] edit source again --- .../userarea/importify/import_auto_script.php | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/public/userarea/importify/import_auto_script.php b/public/userarea/importify/import_auto_script.php index f31486a..b09f196 100644 --- a/public/userarea/importify/import_auto_script.php +++ b/public/userarea/importify/import_auto_script.php @@ -259,26 +259,26 @@ if(isset($_FILES['f_csv'])) { //----------- result_project table ------------------ foreach($part as $result_project) { //check exist result_project item - $result_project_query = new WA_MySQLi_RS("getquery", $repnew, 0); - $sql_result_project_query = "SELECT * FROM result_project WHERE idPart='$idparts' and idreports='$idreports' and idproducts='$idproducts'"; - +// $result_project_query = new WA_MySQLi_RS("getquery", $repnew, 0); +// $sql_result_project_query = "SELECT * FROM result_project WHERE idPart='$idparts' and idreports='$idreports' and idproducts='$idproducts'"; +// $arr_result_project_need_idx = array(); for ($i = 0; $i < count($arr_associate); $i++) { if ($arr_associate[$i]['table_name'] == "result_project") { array_push($arr_result_project_need_idx, array($arr_associate[$i]['column_name'], array_search($arr_associate[$i]['headerfile'], $arr_excel_columns))); } } - - foreach($arr_result_project_need_idx as $q) { - $sql_result_project_query .= " and ".$q[0]."='".$q[1]."'"; - } - - $result_project_query->setQuery($sql_result_project_query); - $result_project_query->execute(); - - $result_project_info = $result_project_query->Results; - - if (count($result_project_info) == 0) { +// +// foreach($arr_result_project_need_idx as $q) { +// $sql_result_project_query .= " and ".$q[0]."='".$q[0]."'"; +// } +// +// $result_project_query->setQuery($sql_result_project_query); +// $result_project_query->execute(); +// +// $result_project_info = $result_project_query->Results; +// +// if (count($result_project_info) == 0) { $InsertQuery = new WA_MySQLi_Query($repnew); $InsertQuery->Action = "insert"; $InsertQuery->Table = "`result_project`"; @@ -291,7 +291,7 @@ if(isset($_FILES['f_csv'])) { } $InsertQuery->saveInSession(""); $InsertQuery->execute(); - } +// } } } }