쿼리문 좀 하나 봐주세요... 정보
쿼리문 좀 하나 봐주세요...본문
게시판에서 글을 클릭하면 view스킨 페이지에 그 사람이 쓴 글이 보여지면서, 상단 조회를 없애버리고 그자리에 그 사람이 이 게시판에서 남긴 글 횟수를 표시해주고 싶습니다.
그래서..
<?
$vel_cnt = sql_query("select count(*) as cnt from $g4_write_reserve_sorry where mb_id='$write[mb_id]'");
$vel_count=number_format($vel_cnt[cnt]);
?>
이렇게 해봤는데 이건 아니드라고.. 레져블소리 데이터에서 글 쓴사람의 아이디와 일치하는 글 횟수를 뽑고 싶은데... 어찌해야하오리까요?
좀 도움 주실 분 안계신가요?
부탁드립니다.
그래서..
<?
$vel_cnt = sql_query("select count(*) as cnt from $g4_write_reserve_sorry where mb_id='$write[mb_id]'");
$vel_count=number_format($vel_cnt[cnt]);
?>
이렇게 해봤는데 이건 아니드라고.. 레져블소리 데이터에서 글 쓴사람의 아이디와 일치하는 글 횟수를 뽑고 싶은데... 어찌해야하오리까요?
좀 도움 주실 분 안계신가요?
부탁드립니다.
댓글 전체
<?
$row= sql_fetch("select count(*) as cnt from g4_write_reserve_sorry where wr_is_comment = '0' and wr_id <> '$wr_id' and mb_id = '$write[mb_id]'");
echo $row[cnt];
?>
$row= sql_fetch("select count(*) as cnt from g4_write_reserve_sorry where wr_is_comment = '0' and wr_id <> '$wr_id' and mb_id = '$write[mb_id]'");
echo $row[cnt];
?>
와우..
감사드립니다..
감사드립니다..