안녕하세요 고수님들~~
제가 리스트에서 보여주는 table 필드들입니다.
<td class="num" width="40" align="center"><font size="2"><?=$list[$i][num] + 105 ?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_datetime]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_11]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_10]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_6]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_2]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_1]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_5]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_4]?></font></td>
저중에서 wr_11부분에 입력 버튼을 클릭하면 버튼을 클릭한 시간이 저장 되게 하고 싶습니다.
<input type="button" name="signature" value="입력" onclick="<? $now = $g4['time_ymdhis'];
sql_query(" update $write_table set $list[$i][wr_11] = '$now'"); ?>
위의 식으로 입력 버튼을 만들었더니 리스트 중 하나만 wr_11에 클릭한 시각이 들어가는 것이 아니라
모든 리스트들의 wr_11필드에 시각이 들어갑니다. 입력버튼을 클릭한 리스트에만 시각이 들어가게
하고 싶습니다.
그리고 list페이지를 새로고침하면 시간이 새로고침한 시간으로 바뀌네여...입력했을 때의 시간이
그대로 있어야 하는 데요....
아 그리고 체크박스 권한을 관리자 외에도 쓸 수 있게 하려면 어떻게 해야 하나요...
어떻게 해야 할까요.....도와주세요^^
제가 리스트에서 보여주는 table 필드들입니다.
<td class="num" width="40" align="center"><font size="2"><?=$list[$i][num] + 105 ?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_datetime]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_11]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_10]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_6]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_2]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_1]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_5]?></font></td>
<td class="name" width="100" align="center"><font size="2"><?=$list[$i][wr_4]?></font></td>
저중에서 wr_11부분에 입력 버튼을 클릭하면 버튼을 클릭한 시간이 저장 되게 하고 싶습니다.
<input type="button" name="signature" value="입력" onclick="<? $now = $g4['time_ymdhis'];
sql_query(" update $write_table set $list[$i][wr_11] = '$now'"); ?>
위의 식으로 입력 버튼을 만들었더니 리스트 중 하나만 wr_11에 클릭한 시각이 들어가는 것이 아니라
모든 리스트들의 wr_11필드에 시각이 들어갑니다. 입력버튼을 클릭한 리스트에만 시각이 들어가게
하고 싶습니다.
그리고 list페이지를 새로고침하면 시간이 새로고침한 시간으로 바뀌네여...입력했을 때의 시간이
그대로 있어야 하는 데요....
아 그리고 체크박스 권한을 관리자 외에도 쓸 수 있게 하려면 어떻게 해야 하나요...
어떻게 해야 할까요.....도와주세요^^
댓글 2개
sql_query(" update $write_table set $list[$i][wr_11] = '$now'");
mysql을 이해를 잘 못하신것같네요
위 쿼리는 $write_table로된 테이블에 $list[$i][wr_11] 로 된 변수 컬럼값에 $now를 넣어라 입니다
이는 * 이부분이 빠져있더라도 모든 $write_table의 $list[$i][wr_11]로 된 모든 컬럼에 값을 넣는게 됩니다.
이부분에다가 where 를 넣어주셔야 해당 게시물만 바뀌게 됩니다
where wr_id={$list[$i][wr_id]} 추가 하면 해당게시물만 들어가겠죠
mysql을 이해를 잘 못하신것같네요
위 쿼리는 $write_table로된 테이블에 $list[$i][wr_11] 로 된 변수 컬럼값에 $now를 넣어라 입니다
이는 * 이부분이 빠져있더라도 모든 $write_table의 $list[$i][wr_11]로 된 모든 컬럼에 값을 넣는게 됩니다.
이부분에다가 where 를 넣어주셔야 해당 게시물만 바뀌게 됩니다
where wr_id={$list[$i][wr_id]} 추가 하면 해당게시물만 들어가겠죠
게시글 목록
| 번호 | 제목 |
|---|---|
| 284348 | |
| 284336 | |
| 284333 | |
| 284332 | |
| 284320 | |
| 284318 | |
| 284316 | |
| 284313 | |
| 284307 | |
| 284306 | |
| 284303 | |
| 284298 | |
| 284296 | |
| 284290 | |
| 284286 | |
| 284280 | |
| 284277 | |
| 284272 | |
| 284261 | |
| 284259 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기