누가 검색했는지 알려주는건데요. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

누가 검색했는지 알려주는건데요. 정보

누가 검색했는지 알려주는건데요.

본문

http://sir.co.kr/bbs/board.php?bo_table=g4_qa&wr_id=141178



g4_popular 테이블에 mb_id 필드를 추가하고 /bbs/search.php에서 다음을 수정하세요

        $sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]' ";

이걸 다음과 같이

        $sql = " insert into $g4[popular_table] set pp_word = '$search_str', pp_date = '$g4[time_ymd]', pp_ip = '$_SERVER[REMOTE_ADDR]', mb_id = '$member[mb_id] ";

검색을 누가 뭘 했는지 보고 싶다면 다음과 같이 결과 확인
$query = "select * from `$g4[popular_table] where mb_id order  by pp_id DESC"
while($row = sql_fetch_array($query)) {
  echo "$row[pp_word] - $row[mb_id]";
}





검색을 누가 뭘 했는지 보고 싶다면 다음과 같이 결과 확인 ←이부분은 어디에 추가하는거예요?


$query = "select * from `$g4[popular_table] where mb_id order  by pp_id DESC"
while($row = sql_fetch_array($query)) {
  echo "$row[pp_word] - $row[mb_id]";
}


위 코드에서 작은따옴표랑 세미콜론이 빠졌다는데 어딘지 좀 알려주세요.

( select a.* , ( select sum(co_count) as co_count from g4_qa_choose where mb_id=a.mb_id and bo_table = 'g4_qa' ) as q_co_count from `g4_write_g4_qa` a where wr_parent = '284033' and wr_8 != '' and wr_is_comment = 1 and CONVERT(wr_7, UNSIGNED) >= 5 group by wr_content having max(wr_7) order by CONVERT(wr_7, UNSIGNED) desc limit 3 )

1055 : Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'sir.a.wr_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

error file : /15sir/bbs/board.php