在 BPM 应用程序中,我试图遍历关联数组的关联数组,并使用 foreach 循环仅返回值 (APP_UID)。但是,我只能显示最后生成的值,而不是所有值。
这是我的代码:
$currentUser = @@USER_LOGGED;
//Copy Notes to Subprocess
$caseId = @@APPLICATION; //Case UID
$subcases = executeQuery("SELECT APP_UID FROM SUB_APPLICATION WHERE APP_PARENT='$caseId'");
if (is_array($subcases) and count($subcases) > 0) {
foreach($subcases as $subcase)
$subCaseId = $subcase["APP_UID"] . ", ";
//Update the Sent By status
executeQuery("UPDATE APP_CACHE_VIEW SET PREVIOUS_USR_UID = '$currentUser' WHERE APP_UID IN ('$subCaseId')");
}
executeQuery 函数应该生成如下所示的 SQL 语句,但事实并非如此。例子:
UPDATE APP_CACHE_VIEW SET PREVIOUS_USR_UID = '54454572356235' WHERE APP_UID IN
('336545547', '436545534', '736545125')
关于我做错了什么的任何想法?