투표에서요 투표한 항목의 카운트수를 내고 싶은데요~ 쿼리를 어떻게 째야할까요?? 정보
투표에서요 투표한 항목의 카운트수를 내고 싶은데요~ 쿼리를 어떻게 째야할까요??본문
오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.
오류 주소 :
>>
투표에서요 투표한 항목의 카운트수를 내고 싶은데요~ 쿼리를 어떻게 째야할까요??
$count_sql="select * from $g4[poll_list] where where po_id='$po_id' count(pl_cnt1) count(pl_cnt2) count(pl_cnt3) count(pl_cnt4) count(pl_cnt5);";
투표 테이블을 하나 만들엇고요
투표한사람들이 list쌓이게 해놓앗구요
그 리스트에서 항목1 .. 항목5 까지 각각 카운트수를 1번째 항목 좋음 몇개 나쁨 몇개
2번째 항목 좋음몇개 나쁨 몇개
이렇게 카운트를 구해야하는데요
고수님들 도와주세요~~
오류 주소 :
>>
투표에서요 투표한 항목의 카운트수를 내고 싶은데요~ 쿼리를 어떻게 째야할까요??
$count_sql="select * from $g4[poll_list] where where po_id='$po_id' count(pl_cnt1) count(pl_cnt2) count(pl_cnt3) count(pl_cnt4) count(pl_cnt5);";
투표 테이블을 하나 만들엇고요
투표한사람들이 list쌓이게 해놓앗구요
그 리스트에서 항목1 .. 항목5 까지 각각 카운트수를 1번째 항목 좋음 몇개 나쁨 몇개
2번째 항목 좋음몇개 나쁨 몇개
이렇게 카운트를 구해야하는데요
고수님들 도와주세요~~
댓글 전체
$count_sql="select * from $g4[poll_list] where where po_id='$po_id' count(pl_cnt1) count(pl_cnt2) count(pl_cnt3) count(pl_cnt4) count(pl_cnt5);";
이런 sql문은 첨 보네요..
$count_sql="select count(pl_cnt1), count(pl_cnt2) from $g4[poll_list] where where po_id='$po_id'";
$result=sql_query($count_sql);
$cnt1=mysql_result($result,0,0);
$cnt2=mysql_result($result(0,1);
이런식으로 해 보세요.
이런 sql문은 첨 보네요..
$count_sql="select count(pl_cnt1), count(pl_cnt2) from $g4[poll_list] where where po_id='$po_id'";
$result=sql_query($count_sql);
$cnt1=mysql_result($result,0,0);
$cnt2=mysql_result($result(0,1);
이런식으로 해 보세요.
대충 알기 편하라고 ㅎㅎ 해놓아성요 ㅎㅎ 아하 너무 감사드립니다^^ 짱~~