| 2052 번 글: php-count 질문좀... |
| 글쓴이: 김성민
|
글쓴날: 2004년 05월 07일 23:23:22 금(저녁) |
조회: 843 |
안녕하세요.
안된다고들 하는데 혹시나 방법이 있는가 궁금해서요.
$process1=mysql_fetch_array(mysql_query("select count(id) from orderinfo where
ordertime <= '$tommorow' and ordertime >= '$today' and process='0' and
dbstatus='1'"));
$process2=mysql_fetch_array(mysql_query("select count(id) from orderinfo where
ordertime <= '$tommorow' and ordertime >= '$today' and process='1' and
dbstatus='1'"));
$process3=mysql_fetch_array(mysql_query("select count(id) from orderinfo where
ordertime <= '$tommorow' and ordertime >= '$today' and process='2' and
dbstatus='1'"));
echo $process1[0];
echo $process2[0];
echo $process3[0];
이와 같이 count로 갯수를 셀때 process='0' 이 조건 때문에 각기
쿼리를 해야하는데,
count(process='0') 과 같이 count 에 조건을 줄수 있는지 궁금
합니다.
안된다면 위와 같은 쿼리를 한번의 쿼리로 해결이 되는가가
궁금 합니다.
|
이전글 : Re: 특정 파일을 특정 디렉토리의 서브디렉토리에 덮어 쓰기...
다음글 : Re: php-count 질문좀...
|
from 61.39.61.245
JS(Redhands)Board 0.4 +@
|