diff --git a/public_html/assets/api/install.php b/public_html/assets/api/install.php index 228306c..9087f0f 100644 --- a/public_html/assets/api/install.php +++ b/public_html/assets/api/install.php @@ -100,10 +100,24 @@ trait InstallAPI { NOW() AS iw_created_at FROM tbl_customer c WHERE c.c_uid = '{$c_uid}' + AND NOT EXISTS ( + SELECT 1 + FROM tbl_install_waitlist iw + WHERE iw.iw_customer_uid = c.c_uid + AND iw.iw_status NOT IN ('DELETED','COMPLETED') + ) "; qry($sql); + if (mysqli_affected_rows($GLOBALS['conn']) == 0) { + echo $this->json([ + 'ok' => 0, + 'msg' => '이미 waitlist에 존재합니다.' + ]); + return; + } + $iw_uid = mysqli_insert_id($GLOBALS['conn']); // or global db handle echo $this->json([ diff --git a/public_html/doc/install_wait_list.php b/public_html/doc/install_wait_list.php index ace2890..8432175 100644 --- a/public_html/doc/install_wait_list.php +++ b/public_html/doc/install_wait_list.php @@ -2128,8 +2128,8 @@ while ($row = mysqli_fetch_assoc($rmem)) { unassignDailyInstall(ids); }); - - + +