- $sql = "SELECT ".TB_PREF."bank_trans.*, ".TB_PREF."comments.memo_
- FROM ".TB_PREF."bank_trans LEFT JOIN ".TB_PREF."comments ON
- (".TB_PREF."bank_trans.type = ".TB_PREF."comments.type
- AND ".TB_PREF."bank_trans.trans_no = ".TB_PREF."comments.id)
- WHERE ".TB_PREF."bank_trans.bank_act = '$account'
+ $sql = "SELECT trans.*, com.memo_
+ FROM "
+ .TB_PREF."bank_trans trans
+ LEFT JOIN ".TB_PREF."comments com ON trans.type = com.type AND trans.trans_no = com.id
+ WHERE trans.bank_act = '$account'