<?
$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년 전
정말 감사합니다!!! 많은 도움이 되었어요!! ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4930 | 13년 전 | 654 | ||
| 4929 | 13년 전 | 2018 | ||
| 4928 | 13년 전 | 629 | ||
| 4927 |
|
13년 전 | 787 | |
| 4926 | 13년 전 | 1110 | ||
| 4925 |
techer
|
13년 전 | 1270 | |
| 4924 |
techer
|
13년 전 | 2877 | |
| 4923 |
techer
|
13년 전 | 3082 | |
| 4922 | 13년 전 | 596 | ||
| 4921 | 13년 전 | 1101 | ||
| 4920 |
StyleRoot
|
13년 전 | 579 | |
| 4919 | 13년 전 | 1159 | ||
| 4918 |
onlymilk74
|
13년 전 | 942 | |
| 4917 |
하나데이타
|
13년 전 | 826 | |
| 4916 |
하나데이타
|
13년 전 | 1152 | |
| 4915 | 13년 전 | 416 | ||
| 4914 | 13년 전 | 1810 | ||
| 4913 | 13년 전 | 1554 | ||
| 4912 | 13년 전 | 1284 | ||
| 4911 | 13년 전 | 724 | ||
| 4910 | 13년 전 | 1207 | ||
| 4909 |
성민꼬르꼬
|
13년 전 | 1421 | |
| 4908 | 13년 전 | 1022 | ||
| 4907 | 13년 전 | 2203 | ||
| 4906 | 13년 전 | 858 | ||
| 4905 |
kinyenug1
|
13년 전 | 591 | |
| 4904 |
kinyenug1
|
13년 전 | 776 | |
| 4903 | 13년 전 | 3572 | ||
| 4902 | 13년 전 | 2449 | ||
| 4901 | 13년 전 | 1007 | ||
| 4900 | 13년 전 | 1182 | ||
| 4899 | 13년 전 | 2582 | ||
| 4898 | 13년 전 | 1569 | ||
| 4897 |
다케미카코
|
13년 전 | 743 | |
| 4896 |
안뇽하어영
|
13년 전 | 802 | |
| 4895 |
baek83
|
13년 전 | 2205 | |
| 4894 | 13년 전 | 692 | ||
| 4893 | 13년 전 | 941 | ||
| 4892 | 13년 전 | 435 | ||
| 4891 | 13년 전 | 593 | ||
| 4890 | 13년 전 | 1329 | ||
| 4889 |
Black
|
13년 전 | 2874 | |
| 4888 |
techer
|
13년 전 | 634 | |
| 4887 |
techer
|
13년 전 | 895 | |
| 4886 |
visualp
|
13년 전 | 1282 | |
| 4885 | 13년 전 | 693 | ||
| 4884 |
너는나의봄이다
|
13년 전 | 2310 | |
| 4883 | 13년 전 | 911 | ||
| 4882 | 13년 전 | 1584 | ||
| 4881 | 13년 전 | 1825 | ||
| 4880 | 13년 전 | 1642 | ||
| 4879 | 13년 전 | 961 | ||
| 4878 |
|
13년 전 | 1256 | |
| 4877 | 13년 전 | 764 | ||
| 4876 |
꿈을꾸는너구리
|
13년 전 | 632 | |
| 4875 |
성민꼬르꼬
|
13년 전 | 1288 | |
| 4874 | 13년 전 | 978 | ||
| 4873 | 13년 전 | 826 | ||
| 4872 | 13년 전 | 744 | ||
| 4871 | 13년 전 | 911 | ||
| 4870 | 13년 전 | 700 | ||
| 4869 | 13년 전 | 1213 | ||
| 4868 | 13년 전 | 922 | ||
| 4867 | 13년 전 | 622 | ||
| 4866 | 13년 전 | 1226 | ||
| 4865 | 13년 전 | 855 | ||
| 4864 |
기획자정군
|
13년 전 | 1588 | |
| 4863 |
꼬꼬아부지
|
13년 전 | 1014 | |
| 4862 | 13년 전 | 3493 | ||
| 4861 |
|
13년 전 | 1554 | |
| 4860 |
|
13년 전 | 2145 | |
| 4859 | 13년 전 | 778 | ||
| 4858 | 13년 전 | 428 | ||
| 4857 | 13년 전 | 1109 | ||
| 4856 |
크라운엠버서더
|
13년 전 | 1900 | |
| 4855 | 13년 전 | 796 | ||
| 4854 | 13년 전 | 2034 | ||
| 4853 | 13년 전 | 732 | ||
| 4852 | 13년 전 | 1087 | ||
| 4851 |
꼬꼬아부지
|
13년 전 | 1793 | |
| 4850 | 13년 전 | 1112 | ||
| 4849 |
|
13년 전 | 769 | |
| 4848 | 13년 전 | 1471 | ||
| 4847 |
|
13년 전 | 3783 | |
| 4846 | 13년 전 | 505 | ||
| 4845 | 13년 전 | 573 | ||
| 4844 | 13년 전 | 761 | ||
| 4843 | 13년 전 | 3905 | ||
| 4842 | 13년 전 | 1244 | ||
| 4841 | 13년 전 | 1415 | ||
| 4840 | 13년 전 | 1431 | ||
| 4839 | 13년 전 | 731 | ||
| 4838 | 13년 전 | 606 | ||
| 4837 | 13년 전 | 754 | ||
| 4836 |
TIAMO
|
13년 전 | 1565 | |
| 4835 | 13년 전 | 926 | ||
| 4834 | 13년 전 | 1267 | ||
| 4833 | 13년 전 | 2462 | ||
| 4832 |
|
13년 전 | 922 | |
| 4831 | 13년 전 | 1246 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기