php mysql 多表查询

2024-11-19 15:13:49
推荐回答(1个)
回答(1):

$sql = "select gjd_callback.call_fee, gjd_callback.call_time from gjd_callball,gjd_cs where gjd_cs.id=gjd_callback.call_id and gjd_cs.id=$id"
还可以:
$sql = "select gjd_callback.call_fee, gjd_callback.call_time from
gjd_callball
left join gjd_cs on

gjd_cs.id=gjd_callback.call_id

where
gjd_cs.id=$id"
这两句都可以!