그룹의 그룹내 사용자가 전체 메시지 보내기. > 개발자팁

개발자팁

개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.

그룹의 그룹내 사용자가 전체 메시지 보내기. 정보

PHP 그룹의 그룹내 사용자가 전체 메시지 보내기.

첨부파일

client.sql (2.8K) 1회 다운로드 2024-01-28 14:31:41

본문

[code]


$str="east";
$msg_id="abc";
$str_p="ok";
$find_sql="select * from groups where `UserGroup` like '$str'";
$find_result=mysqli_query($conn,$find_sql);
$find_check=mysqli_num_rows($find_result);
if($find_check < 1 ) { echo " 존재하지 않습니다";}
else {
while($user_fetch=mysqli_fetch_assoc($find_result)) {
$user_id=stripslashes($user_fetch['UserId']);
$update="update groups set GetMessage = '$str_p' where UserId = '$user_id' and GroupIdx >=1;";
$run=mysqli_query($conn,$update);
}
$delete="UPDATE `groups` SET `GetMessage` = ''  where `UserId` like '$msg_id' and `GroupIdx` >=1;";
$delete_run=mysqli_query($conn,$delete);


}
[</code]

SQL은 첨부.

변형해서 그룹끼리 할수도 있다.

추천
0

댓글 0개

전체 5,352
개발자팁 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT