중복값을 체크하는 쿼리인데요
특정분류 '사과"
에서만 체크하고 싶은데 지식의 한계를 느낍니다.
스승님 알려주십시오
sql_fetch(" select COUNT(*) as cnt from g5_write_armyb where wr_subject = '$wr_subject' and wr_datetime > date_sub(now(), interval 1 hour) ");
|
답변 1개 / 댓글 1개
채택된 답변
+20 포인트
쿼리에서 특정값 조건이 성립할때만 검색을할려면
where에서 조건을 줘야합니다
where column = '사과' where의 조건이 여러개일경우 and로 붙이면됩니다
sql_fetch(" select COUNT(*) as cnt from g5_write_armyb where column = '사과' and wr_subject = '$wr_subject' and wr_datetime > date_sub(now(), interval 1 hour) ");
답변에 대한 댓글 1개
답변을 작성하려면 로그인이 필요합니다.