php mysql 多表查询

2024年11月19日 15:13
有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"
这两句都可以!