【发布时间】:2013-01-04 11:01:21
【问题描述】:
我有这个问题。
我需要从匹配表中获取这些字段:
date, points
然后我的匹配表中还有一个epos_id 字段..
我还有另一个 rbpos_epos 表,其中包含 epos_id 和 location 字段。
我需要使用连接从rbpos_epos 获取location .. 像这样:
SELECT matching.date, matching.points, matching.time,matching.location,matching.epos_id,rbpos_epos.epos_id,rbpos_epos.location
FROM matching WHERE matching.user_id="'.$id_user.'"
LEFT JOIN rbpos_epos where matching.epos_id=rbpos_epos.epos_id;
【问题讨论】:
标签: mysql select join left-join