select m.*, c.NAME as CORP_NAME
from MAIL_LOG as m, CORP as c
where m.SEND_DATE >= '$term_from' and m.SEND_DATE <= '$term_end' ";
Select DISTINCT `TO_NAME_F_KANA` from MAIL_LOG group by m.SEND_DATE;
我想從與TO_NAME_F_KANA
爲基準,在第一個查詢得到的唯一值。
你必須在你的第一個查詢MAIL_LOG表和CORP表之間的連接沒有限制,是故意的嗎? –