|
|
|
11-10-10
|
조회 1,627
|
|
|
|
11-10-10
|
조회 1,686
|
|
|
|
11-10-10
|
조회 1,714
|
|
|
|
11-10-10
|
조회 1,189
|
|
|
|
11-10-10
|
조회 852
|
|
|
|
11-10-10
|
조회 2,011
|
|
|
|
11-10-10
|
조회 1,056
|
|
|
|
11-10-10
|
조회 1,262
|
|
|
|
11-10-10
|
조회 1,014
|
|
|
|
11-10-10
|
조회 8,663
|
|
|
|
11-10-10
|
조회 1,642
|
|
|
|
11-10-10
|
조회 1,246
|
|
|
|
11-10-10
|
조회 1,508
|
|
|
|
11-10-10
|
조회 2,892
|
|
|
|
11-10-10
|
조회 2,052
|
|
|
|
11-10-10
|
조회 1,806
|
|
|
|
11-10-10
|
조회 1,843
|
|
|
|
11-10-10
|
조회 1,599
|
|
|
|
11-10-09
|
조회 1,705
|
|
|
|
11-10-09
|
조회 1,619
|
댓글 6개
아래와 같이 여분필드 wr_1에 누적시켜 나가는 것 입니다
if( strpos($view[wr_1], $member[mb_name].',' ) === false)
sql_query("update $write_table set wr_1=CONCAT( wr_1, ',' , '$member[mb_name]') where wr_id='$view[wr_id]' ");
그런데 여분필드는 길이가 255바이트 이므로 글 읽는 회원수가 많다면
wr_1 필드를 text 등으로 변경할 필요가 있습니다
출력시에는
echo preg_replace("/,$/",'', $view[wr_1]); //마지막 콤마 제거
그런데 에러가 납니다.ㅠㅠ
upate g4_write_gucci_daily set wr_1=CONCAT( wr_1, ',' , '운영자') where wr_id='1'
1064 : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'upate g4_write_gucci_daily set wr_1=CONCAT( wr_1, ',' , '운영자') where wr_i' at line 1
error file : /bbs/board.php
한번 등록된 이름은 두번 등록되지않게 하기 위함인데..
아래처럼 하세요
$tmp_name=$member[mb_name].',';
if( strpos($view[wr_1], $tmp_name ) === false)
sql_query("update $write_table set wr_1=CONCAT( wr_1, '' , '$tmp_name') where wr_id='$view[wr_id]' ");
스크랩해둬야 겠네요^^