<?
$qry = "SELECT op_pcode,sum(op_cnt) as cnt
FROM view_order where paystatus = 'Y'
and canceled = 'N'
and ifnull(isNow,'N') = 'Y'
group by op_pcode
order by cnt desc limit 10";
$qry = "SELECT op_pcode,sum(op_cnt) as cnt
FROM view_order where paystatus = 'Y'
and canceled = 'N'
and ifnull(isNow,'N') = 'Y'
group by op_pcode
order by cnt desc limit 10";
$rlt = mysql_query($qry);
while($row = mysql_fetch_array($rlt)) {
$pcode = $row['op_pcode'];
$pcnt = $row['cnt'];
//상품명
$prslt = mysql_fetch_array(mysql_query("select name,cateCode,price_org,price,saleCnt from odtProduct where code='".$pcode."'"));
$pname = $prslt[name];
$price_org = $prslt[price_org];
$price = $prslt[price];
$pcatecode = $prslt[cateCode];
$psalecnt = $prslt[saleCnt];
$prslt = mysql_fetch_array(mysql_query("select name,cateCode,price_org,price,saleCnt from odtProduct where code='".$pcode."'"));
$pname = $prslt[name];
$price_org = $prslt[price_org];
$price = $prslt[price];
$pcatecode = $prslt[cateCode];
$psalecnt = $prslt[saleCnt];
//카레고리명
$pcatename = mysql_result(mysql_query("select catename from odtCategory where catecode='".$pcatecode."'"),0);
$pcatename = mysql_result(mysql_query("select catename from odtCategory where catecode='".$pcatecode."'"),0);
?>
이것들이 다 무슨 말이지요?? 저는 디비 안에 있는 [saleCnt] 라는 디비값만 가져오고 싶은데...
저 위의 구문이 해석이 안되니 힘드네요 ..
빨간색 구문은 특히 이해가 안갑니다 무슨 설정 값인지..
아래부분은 대충 이해는 했습니다만 ㅠㅠ
해석해주실 능력자분 계신가요?
댓글 3개
13년 전
자유게시판에서 게시물 이동됩니다.
13년 전
SELECT 검색해라
op_pcode,sum(op_cnt) as cnt 를
FROM view_order 이테이블에서
where paystatus = 'Y'
and canceled = 'N'
and ifnull(isNow,'N') = 'Y'
조건은 지불상태가y이면서 취소하지 않은것을 그리고 isnow 상태가 비어있다면 n으로 바꿔라 그 isnow 가 y 인조건으로
group by op_pcode
그결과를 op_pcode 로 묵어라
order by cnt desc
소팅하라 cnt가 높은순으로
limit 10
그중 10개만 출력하라 정도 되겠습니다
op_pcode,sum(op_cnt) as cnt 를
FROM view_order 이테이블에서
where paystatus = 'Y'
and canceled = 'N'
and ifnull(isNow,'N') = 'Y'
조건은 지불상태가y이면서 취소하지 않은것을 그리고 isnow 상태가 비어있다면 n으로 바꿔라 그 isnow 가 y 인조건으로
group by op_pcode
그결과를 op_pcode 로 묵어라
order by cnt desc
소팅하라 cnt가 높은순으로
limit 10
그중 10개만 출력하라 정도 되겠습니다
13년 전
정말 감사합니다!!! 많은 도움이 되었어요!! ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 5230 | 13년 전 | 3062 | ||
| 5229 | 13년 전 | 566 | ||
| 5228 | 13년 전 | 609 | ||
| 5227 | 13년 전 | 716 | ||
| 5226 | 13년 전 | 9170 | ||
| 5225 | 13년 전 | 2183 | ||
| 5224 | 13년 전 | 2598 | ||
| 5223 | 13년 전 | 2565 | ||
| 5222 | 13년 전 | 3129 | ||
| 5221 |
visualp
|
13년 전 | 716 | |
| 5220 |
|
13년 전 | 750 | |
| 5219 | 13년 전 | 4645 | ||
| 5218 |
|
13년 전 | 680 | |
| 5217 |
크라이스트
|
13년 전 | 1367 | |
| 5216 | 13년 전 | 1220 | ||
| 5215 | 13년 전 | 1239 | ||
| 5214 | 13년 전 | 1108 | ||
| 5213 | 13년 전 | 646 | ||
| 5212 | 13년 전 | 1337 | ||
| 5211 | 13년 전 | 734 | ||
| 5210 |
visualp
|
13년 전 | 1452 | |
| 5209 |
visualp
|
13년 전 | 1084 | |
| 5208 |
mammoth
|
13년 전 | 728 | |
| 5207 | 13년 전 | 2107 | ||
| 5206 | 13년 전 | 1075 | ||
| 5205 | 13년 전 | 692 | ||
| 5204 |
|
13년 전 | 2260 | |
| 5203 | 13년 전 | 1173 | ||
| 5202 | 13년 전 | 1193 | ||
| 5201 |
kastel
|
13년 전 | 1353 | |
| 5200 | 13년 전 | 1064 | ||
| 5199 | 13년 전 | 561 | ||
| 5198 | 13년 전 | 626 | ||
| 5197 | 13년 전 | 1563 | ||
| 5196 | 13년 전 | 775 | ||
| 5195 | 13년 전 | 1791 | ||
| 5194 | 13년 전 | 1293 | ||
| 5193 | 13년 전 | 606 | ||
| 5192 | 13년 전 | 4049 | ||
| 5191 | 13년 전 | 730 | ||
| 5190 |
|
13년 전 | 1850 | |
| 5189 | 13년 전 | 1170 | ||
| 5188 | 13년 전 | 1543 | ||
| 5187 |
믹스디자인
|
13년 전 | 805 | |
| 5186 |
|
13년 전 | 2382 | |
| 5185 | 13년 전 | 1427 | ||
| 5184 | 13년 전 | 887 | ||
| 5183 | 13년 전 | 1403 | ||
| 5182 | 13년 전 | 681 | ||
| 5181 | 13년 전 | 713 | ||
| 5180 |
프리온관리자
|
13년 전 | 715 | |
| 5179 | 13년 전 | 983 | ||
| 5178 | 13년 전 | 648 | ||
| 5177 | 13년 전 | 570 | ||
| 5176 | 13년 전 | 680 | ||
| 5175 | 13년 전 | 1397 | ||
| 5174 | 13년 전 | 852 | ||
| 5173 | 13년 전 | 591 | ||
| 5172 |
|
13년 전 | 563 | |
| 5171 | 13년 전 | 899 | ||
| 5170 |
KhanSu
|
13년 전 | 693 | |
| 5169 | 13년 전 | 2157 | ||
| 5168 | 13년 전 | 1487 | ||
| 5167 |
sir24
|
13년 전 | 679 | |
| 5166 | 13년 전 | 1742 | ||
| 5165 | 13년 전 | 727 | ||
| 5164 | 13년 전 | 1650 | ||
| 5163 |
|
13년 전 | 991 | |
| 5162 |
곰도리푸우
|
13년 전 | 4085 | |
| 5161 |
UltraUCC
|
13년 전 | 1226 | |
| 5160 |
|
13년 전 | 883 | |
| 5159 |
그런듯아닌듯
|
13년 전 | 544 | |
| 5158 |
|
13년 전 | 517 | |
| 5157 | 13년 전 | 1651 | ||
| 5156 | 13년 전 | 1152 | ||
| 5155 | 13년 전 | 2631 | ||
| 5154 | 13년 전 | 786 | ||
| 5153 | 13년 전 | 782 | ||
| 5152 |
|
13년 전 | 622 | |
| 5151 | 13년 전 | 826 | ||
| 5150 |
senseme
|
13년 전 | 549 | |
| 5149 |
워드앤코드
|
13년 전 | 1000 | |
| 5148 | 13년 전 | 693 | ||
| 5147 |
프로프리랜서
|
13년 전 | 902 | |
| 5146 | 13년 전 | 2393 | ||
| 5145 |
투코아미디어
|
13년 전 | 1491 | |
| 5144 |
there007
|
13년 전 | 1502 | |
| 5143 | 13년 전 | 1364 | ||
| 5142 | 13년 전 | 2086 | ||
| 5141 |
silky
|
13년 전 | 758 | |
| 5140 |
silky
|
13년 전 | 632 | |
| 5139 |
silky
|
13년 전 | 1972 | |
| 5138 |
silky
|
13년 전 | 568 | |
| 5137 |
silky
|
13년 전 | 591 | |
| 5136 |
silky
|
13년 전 | 878 | |
| 5135 |
silky
|
13년 전 | 614 | |
| 5134 |
silky
|
13년 전 | 467 | |
| 5133 |
|
13년 전 | 830 | |
| 5132 |
복이219
|
13년 전 | 970 | |
| 5131 |
바부바부팅이
|
13년 전 | 997 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기