<?
$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년 전
정말 감사합니다!!! 많은 도움이 되었어요!! ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4630 | 13년 전 | 1189 | ||
| 4629 | 13년 전 | 4362 | ||
| 4628 | 13년 전 | 766 | ||
| 4627 |
|
13년 전 | 1755 | |
| 4626 | 13년 전 | 810 | ||
| 4625 |
마릴릴모니
|
13년 전 | 723 | |
| 4624 | 13년 전 | 1634 | ||
| 4623 |
SIR정회원
|
13년 전 | 602 | |
| 4622 |
rakoos
|
13년 전 | 1571 | |
| 4621 | 13년 전 | 676 | ||
| 4620 | 13년 전 | 1458 | ||
| 4619 | 13년 전 | 983 | ||
| 4618 | 13년 전 | 4032 | ||
| 4617 | 13년 전 | 2031 | ||
| 4616 | 13년 전 | 853 | ||
| 4615 | 13년 전 | 677 | ||
| 4614 | 13년 전 | 1244 | ||
| 4613 | 13년 전 | 880 | ||
| 4612 |
rakoos
|
13년 전 | 1020 | |
| 4611 |
|
13년 전 | 2108 | |
| 4610 | 13년 전 | 765 | ||
| 4609 | 13년 전 | 2818 | ||
| 4608 | 13년 전 | 2800 | ||
| 4607 | 13년 전 | 1076 | ||
| 4606 | 13년 전 | 771 | ||
| 4605 | 13년 전 | 2316 | ||
| 4604 | 13년 전 | 889 | ||
| 4603 | 13년 전 | 1141 | ||
| 4602 |
한번잘해보자
|
13년 전 | 677 | |
| 4601 | 13년 전 | 1803 | ||
| 4600 |
|
13년 전 | 1087 | |
| 4599 |
크라운엠버서더
|
13년 전 | 1152 | |
| 4598 | 13년 전 | 1500 | ||
| 4597 | 13년 전 | 592 | ||
| 4596 | 13년 전 | 3661 | ||
| 4595 |
|
13년 전 | 906 | |
| 4594 | 13년 전 | 1786 | ||
| 4593 | 13년 전 | 1279 | ||
| 4592 | 13년 전 | 656 | ||
| 4591 | 13년 전 | 4645 | ||
| 4590 | 13년 전 | 515 | ||
| 4589 | 13년 전 | 2632 | ||
| 4588 |
|
13년 전 | 989 | |
| 4587 | 13년 전 | 645 | ||
| 4586 |
JavaDD
|
13년 전 | 1013 | |
| 4585 | 13년 전 | 7778 | ||
| 4584 | 13년 전 | 972 | ||
| 4583 |
PHPㅡASP프로그래머
|
13년 전 | 2060 | |
| 4582 |
PHPㅡASP프로그래머
|
13년 전 | 1498 | |
| 4581 |
PHPㅡASP프로그래머
|
13년 전 | 1021 | |
| 4580 | 13년 전 | 4084 | ||
| 4579 |
|
13년 전 | 688 | |
| 4578 | 13년 전 | 1188 | ||
| 4577 | 13년 전 | 810 | ||
| 4576 |
Kanzi
|
13년 전 | 865 | |
| 4575 |
|
13년 전 | 1548 | |
| 4574 | 13년 전 | 2341 | ||
| 4573 |
달빛소나타
|
13년 전 | 875 | |
| 4572 | 13년 전 | 994 | ||
| 4571 | 13년 전 | 938 | ||
| 4570 |
|
13년 전 | 1306 | |
| 4569 |
한번잘해보자
|
13년 전 | 553 | |
| 4568 |
Raizond
|
13년 전 | 1018 | |
| 4567 |
Raizond
|
13년 전 | 522 | |
| 4566 |
Revenge
|
13년 전 | 941 | |
| 4565 |
|
13년 전 | 693 | |
| 4564 |
|
13년 전 | 1138 | |
| 4563 | 13년 전 | 1560 | ||
| 4562 | 13년 전 | 1209 | ||
| 4561 | 13년 전 | 9392 | ||
| 4560 | 13년 전 | 1771 | ||
| 4559 | 13년 전 | 3344 | ||
| 4558 | 13년 전 | 468 | ||
| 4557 | 13년 전 | 1446 | ||
| 4556 | 13년 전 | 701 | ||
| 4555 | 13년 전 | 548 | ||
| 4554 | 13년 전 | 541 | ||
| 4553 |
|
13년 전 | 4307 | |
| 4552 | 13년 전 | 1508 | ||
| 4551 | 13년 전 | 1994 | ||
| 4550 | 13년 전 | 680 | ||
| 4549 | 13년 전 | 1036 | ||
| 4548 | 13년 전 | 1571 | ||
| 4547 | 13년 전 | 554 | ||
| 4546 | 13년 전 | 1616 | ||
| 4545 | 13년 전 | 1333 | ||
| 4544 | 13년 전 | 3023 | ||
| 4543 | 13년 전 | 1012 | ||
| 4542 | 13년 전 | 2263 | ||
| 4541 | 13년 전 | 1138 | ||
| 4540 |
|
13년 전 | 1060 | |
| 4539 | 13년 전 | 1155 | ||
| 4538 | 13년 전 | 1586 | ||
| 4537 | 13년 전 | 1172 | ||
| 4536 | 13년 전 | 548 | ||
| 4535 |
|
13년 전 | 822 | |
| 4534 |
|
13년 전 | 981 | |
| 4533 | 13년 전 | 647 | ||
| 4532 |
soing
|
13년 전 | 7376 | |
| 4531 |
|
13년 전 | 6396 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기