불

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 에서 싱글따옴표가 있군요.
백쿼트(`)로 바꾸거나 아예 없애주시기 바랍니다.
밑에부분들에도 싱글따옴표가 있습니다.
확인해서 없애주거나 백쿼트로 변경해 주십시오.
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
12-01-11 조회 2,770
12-01-11 조회 1.2만
12-01-10 조회 2,865
12-01-08 조회 3,456
12-01-05 조회 5,345
11-12-29 조회 3,067
11-12-27 조회 2,854
11-12-25 조회 3,036
11-12-22 조회 3,473
11-12-14 조회 2,932
11-12-12 조회 3,567
11-11-28 조회 3,390
10-10-19 조회 2,848
08-09-05 조회 3,768
08-09-05 조회 3,583
08-06-14 조회 3,323
08-04-22 조회 3,608
08-04-17 조회 3,611
07-10-03 조회 4,221
07-10-03 조회 3,617
07-10-03 조회 7,300
07-10-03 조회 4,579
07-10-03 조회 3,277
07-10-03 조회 2,871
07-10-02 조회 3,585
07-10-02 조회 3,113
07-09-27 조회 5,032
07-09-27 조회 3,856
06-09-26 조회 3,522
06-09-26 조회 4,743
06-09-22 조회 3,913
06-09-22 조회 3,534
06-09-22 조회 4,283
06-09-21 조회 4,212
06-08-18 조회 3,701
05-11-30 조회 4,750
05-07-15 조회 4,602
05-03-23 조회 4,660
05-03-14 조회 3,327
05-03-13 조회 2,702
04-08-05 조회 5,778