Action = "delete"; $deleteQuery->Table = "`template_associate`"; $deleteQuery->addFilter("template_importify_id", "=", "i", "" . $template_id . ""); $deleteQuery->execute(); for($i=0; $iAction = "insert"; $InsertQuery->Table = "`template_associate`"; $InsertQuery->bindColumn("template_importify_id", "i", $template_id, "WA_DEFAULT"); $InsertQuery->bindColumn("arr_csv_columns", "s", "".$arr_csv, "WA_DEFAULT"); $InsertQuery->bindColumn("table_name", "s", "".$arr_selected_tbl_name[$i], "WA_DEFAULT"); $InsertQuery->bindColumn("column_name", "s", "".$arr_selected_tbl_title[$i], "WA_DEFAULT"); $InsertQuery->bindColumn("headerfile", "s", "".$arr_selected_csv[$i], "WA_DEFAULT"); $InsertQuery->bindColumn("db_headerfile", "s", "".$arr_db_headerfile[$i], "WA_DEFAULT"); $InsertQuery->saveInSession(""); $InsertQuery->execute(); } die("success");