그룹의 그룹내 사용자가 전체 메시지 보내기.
[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은 첨부.
변형해서 그룹끼리 할수도 있다.
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5186 | PHP |
swallow
|
2년 전 | 942 | |
| 5185 | PHP |
swallow
|
2년 전 | 962 | |
| 5184 | PHP |
swallow
|
2년 전 | 537 | |
| 5183 | PHP |
swallow
|
2년 전 | 845 | |
| 5182 | PHP |
swallow
|
2년 전 | 778 | |
| 5181 | 기타 |
swallow
|
2년 전 | 1021 | |
| 5180 | 2년 전 | 574 | |||
| 5179 | 기타 |
swallow
|
2년 전 | 1434 | |
| 5178 | PHP |
swallow
|
2년 전 | 796 | |
| 5177 | JavaScript |
swallow
|
2년 전 | 1490 | |
| 5176 | PHP |
swallow
|
2년 전 | 1189 | |
| 5175 | 2년 전 | 566 | |||
| 5174 | 기타 | 2년 전 | 816 | ||
| 5173 | PHP |
|
2년 전 | 969 | |
| 5172 | PHP |
|
2년 전 | 1253 | |
| 5171 | 기타 |
그누GPT
|
2년 전 | 1556 | |
| 5170 | PHP |
|
2년 전 | 1051 | |
| 5169 | PHP |
|
2년 전 | 1226 | |
| 5168 | PHP |
|
2년 전 | 1200 | |
| 5167 | JavaScript |
|
2년 전 | 997 | |
| 5166 | MySQL | 2년 전 | 1191 | ||
| 5165 | MySQL | 2년 전 | 1256 | ||
| 5164 | PHP | 2년 전 | 1501 | ||
| 5163 | OS |
|
2년 전 | 843 | |
| 5162 | 웹서버 |
|
2년 전 | 892 | |
| 5161 | 웹서버 |
|
2년 전 | 975 | |
| 5160 | PHP |
|
2년 전 | 843 | |
| 5159 | PHP |
|
2년 전 | 907 | |
| 5158 | PHP |
|
2년 전 | 917 | |
| 5157 | PHP |
|
2년 전 | 943 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기