그룹의 그룹내 사용자가 전체 메시지 보내기.
[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에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 5276 | 2년 전 | 1331 | |||
| 5275 | 2년 전 | 1401 | |||
| 5274 | 기타 | 2년 전 | 815 | ||
| 5273 | JavaScript |
swallow
|
2년 전 | 1045 | |
| 5272 | node.js |
swallow
|
2년 전 | 742 | |
| 5271 | JavaScript |
swallow
|
2년 전 | 1495 | |
| 5270 | PHP |
swallow
|
2년 전 | 844 | |
| 5269 | node.js |
swallow
|
2년 전 | 680 | |
| 5268 | node.js |
swallow
|
2년 전 | 1209 | |
| 5267 | PHP |
swallow
|
2년 전 | 1591 | |
| 5266 | MySQL |
swallow
|
2년 전 | 1088 | |
| 5265 | PHP |
swallow
|
2년 전 | 2029 | |
| 5264 | JavaScript |
swallow
|
2년 전 | 858 | |
| 5263 | 기타 |
swallow
|
2년 전 | 2980 | |
| 5262 | 기타 |
swallow
|
2년 전 | 667 | |
| 5261 | node.js |
swallow
|
2년 전 | 1059 | |
| 5260 | JavaScript |
swallow
|
2년 전 | 1508 | |
| 5259 | node.js |
swallow
|
2년 전 | 730 | |
| 5258 | node.js |
swallow
|
2년 전 | 1743 | |
| 5257 | node.js |
swallow
|
2년 전 | 1292 | |
| 5256 | PHP |
swallow
|
2년 전 | 1938 | |
| 5255 | node.js |
swallow
|
2년 전 | 684 | |
| 5254 | PHP |
swallow
|
2년 전 | 3011 | |
| 5253 | node.js |
swallow
|
2년 전 | 676 | |
| 5252 | 정규표현식 |
swallow
|
2년 전 | 622 | |
| 5251 | node.js |
swallow
|
2년 전 | 876 | |
| 5250 | PHP |
swallow
|
2년 전 | 1110 | |
| 5249 | node.js |
swallow
|
2년 전 | 1059 | |
| 5248 | PHP |
swallow
|
2년 전 | 1409 | |
| 5247 | node.js |
swallow
|
2년 전 | 1014 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기