테스트 사이트 - 개발 중인 베타 버전입니다

mysql 퀴리문 질문~

SELECT
`mto_action_Bidding`.*,
`mto_action_entryList`.`item`,
`mto_action_entryList`.`amount`,
`mto_action_entryList`.`cancelCheck`,
`mto_action_entryList`.`comment`,
MAX(`mto_action_Bidding`.`price`) as 'maxPrice',
`mto_action_entryList`.`endTime`- 1316981797 AS 'leftTime',
(SELECT `name` FROM `mto_user_data` WHERE `id` = `mto_action_entryList`.`id` LIMIT 1) AS 'contributorName'
FROM `mto_action_Bidding` LEFT JOIN `mto_action_entryList` ON `mto_action_Bidding`.`actionKey` = `mto_action_entryList`.`no` WHERE `mto_action_Bidding`.`id` = 'GM00' ORDER BY `mto_action_Bidding`.`no` DESC LIMIT 0, 10


해당 퀴리문이 있습니다.. 위에것 정상 작동 합니다.

문제가 있다면 아무 데이타가 없으면 그냥 반환이 전혀 안되야 하는데.

MAX(`mto_action_Bidding`.`price`) as 'maxPrice', 문구 때문에


no actionKey id insertTime biddingCheck price item amount cancelCheck comment maxPrice leftTime contributorName
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL

이렇게 쓸모 없는 데이터가 날아 옵니다.

MAX(`mto_action_Bidding`.`price`) as 'maxPrice', 문구 넣으면서
저런 데이터 안 나오게 할수 없나요?<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 17:27:00 MySQL에서 이동 됨]</div>

댓글 작성

댓글을 작성하시려면 로그인이 필요합니다.

로그인하기

댓글 2개

maxPirce 에서 싱글따옴표가 있군요.
백쿼트(`)로 바꾸거나 아예 없애주시기 바랍니다.
밑에부분들에도 싱글따옴표가 있습니다.
확인해서 없애주거나 백쿼트로 변경해 주십시오.

게시글 목록

번호 제목
14699
2648
14695
2643
14694
2634
24207
29791
14692
29790
29789
29786
14689
26002
25999
25998
25994
2628
14688
2624
14686
14682
14676
14673
14670
14666
14660
29785
14658
14657
2606
14654
14651
14647
2578
14645
2568
14643
24199
2559
2539
14640
2536
14639
25989
14636
14633
29783
25982
2531
25981
25980
25979
24196
24193
24191
2526
14629
2525
2524
2522
2519
25977
2516
25964
24187
14621
14614
25956
25955
14609
14602
25953
14599
14596
14595
14594
29782
2499
2484
24180
14592
25952
2478
2466
2460
2459
14589
2456
2436
2420
2403
2397
29778
2393
14586
2387
2384
14581
2381