<?
$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년 전
정말 감사합니다!!! 많은 도움이 되었어요!! ㅠㅠ
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 4430 | 13년 전 | 828 | ||
| 4429 | 13년 전 | 1153 | ||
| 4428 | 13년 전 | 1942 | ||
| 4427 | 13년 전 | 1060 | ||
| 4426 | 13년 전 | 522 | ||
| 4425 | 13년 전 | 9884 | ||
| 4424 |
|
13년 전 | 852 | |
| 4423 |
|
13년 전 | 730 | |
| 4422 |
aequum
|
13년 전 | 1299 | |
| 4421 | 13년 전 | 2417 | ||
| 4420 | 13년 전 | 1206 | ||
| 4419 | 13년 전 | 889 | ||
| 4418 |
한번잘해보자
|
13년 전 | 672 | |
| 4417 | 13년 전 | 1579 | ||
| 4416 | 13년 전 | 874 | ||
| 4415 | 13년 전 | 2256 | ||
| 4414 | 13년 전 | 684 | ||
| 4413 | 13년 전 | 679 | ||
| 4412 | 13년 전 | 820 | ||
| 4411 | 13년 전 | 1439 | ||
| 4410 |
|
13년 전 | 736 | |
| 4409 | 13년 전 | 2172 | ||
| 4408 |
visualp
|
13년 전 | 537 | |
| 4407 |
visualp
|
13년 전 | 3090 | |
| 4406 |
visualp
|
13년 전 | 3259 | |
| 4405 |
visualp
|
13년 전 | 3157 | |
| 4404 |
visualp
|
13년 전 | 2981 | |
| 4403 |
|
13년 전 | 672 | |
| 4402 |
gender
|
13년 전 | 628 | |
| 4401 | 13년 전 | 1121 | ||
| 4400 |
aequum
|
13년 전 | 1385 | |
| 4399 | 13년 전 | 591 | ||
| 4398 | 13년 전 | 672 | ||
| 4397 |
|
13년 전 | 589 | |
| 4396 |
aequum
|
13년 전 | 4666 | |
| 4395 |
|
13년 전 | 573 | |
| 4394 |
aequum
|
13년 전 | 4939 | |
| 4393 |
|
13년 전 | 1271 | |
| 4392 | 13년 전 | 1062 | ||
| 4391 |
mirrV
|
13년 전 | 542 | |
| 4390 |
파워웹프로
|
13년 전 | 710 | |
| 4389 | 13년 전 | 1229 | ||
| 4388 |
Coding
|
13년 전 | 708 | |
| 4387 |
aequum
|
13년 전 | 1366 | |
| 4386 | 13년 전 | 870 | ||
| 4385 | 13년 전 | 722 | ||
| 4384 | 13년 전 | 789 | ||
| 4383 | 13년 전 | 2902 | ||
| 4382 | 13년 전 | 617 | ||
| 4381 | 13년 전 | 1192 | ||
| 4380 | 13년 전 | 816 | ||
| 4379 |
|
13년 전 | 751 | |
| 4378 | 13년 전 | 664 | ||
| 4377 | 13년 전 | 3300 | ||
| 4376 |
aequum
|
13년 전 | 1217 | |
| 4375 |
클로로다인
|
13년 전 | 651 | |
| 4374 |
DDFACTORY
|
13년 전 | 720 | |
| 4373 |
까탈스런ET
|
13년 전 | 710 | |
| 4372 | 13년 전 | 813 | ||
| 4371 | 13년 전 | 576 | ||
| 4370 |
|
13년 전 | 653 | |
| 4369 |
프리프리닷
|
13년 전 | 1307 | |
| 4368 | 13년 전 | 3177 | ||
| 4367 |
soing
|
13년 전 | 1585 | |
| 4366 |
|
13년 전 | 686 | |
| 4365 |
|
13년 전 | 623 | |
| 4364 |
|
13년 전 | 760 | |
| 4363 |
|
13년 전 | 626 | |
| 4362 |
|
13년 전 | 731 | |
| 4361 |
|
13년 전 | 845 | |
| 4360 |
|
13년 전 | 651 | |
| 4359 |
|
13년 전 | 3129 | |
| 4358 |
|
13년 전 | 3042 | |
| 4357 | 13년 전 | 841 | ||
| 4356 | 13년 전 | 1345 | ||
| 4355 | 13년 전 | 969 | ||
| 4354 | 13년 전 | 820 | ||
| 4353 | 13년 전 | 3375 | ||
| 4352 | 13년 전 | 2378 | ||
| 4351 | 13년 전 | 1968 | ||
| 4350 |
|
13년 전 | 1888 | |
| 4349 | 13년 전 | 666 | ||
| 4348 |
aequum
|
13년 전 | 1430 | |
| 4347 | 13년 전 | 668 | ||
| 4346 |
|
13년 전 | 569 | |
| 4345 | 13년 전 | 598 | ||
| 4344 |
aequum
|
13년 전 | 1009 | |
| 4343 |
|
13년 전 | 1045 | |
| 4342 |
aequum
|
13년 전 | 1644 | |
| 4341 | 13년 전 | 810 | ||
| 4340 |
2번호랑이
|
13년 전 | 1010 | |
| 4339 |
|
13년 전 | 1173 | |
| 4338 | 13년 전 | 1170 | ||
| 4337 | 13년 전 | 521 | ||
| 4336 |
aequum
|
13년 전 | 1710 | |
| 4335 | 13년 전 | 894 | ||
| 4334 | 13년 전 | 1195 | ||
| 4333 |
Sturmvogel
|
13년 전 | 968 | |
| 4332 |
aequum
|
13년 전 | 1285 | |
| 4331 |
aequum
|
13년 전 | 1407 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기