如何在一个语句中加入四个MySQL表
|
这是我目前没有加入的声明
$s1 = \"SELECT *
FROM states
WHERE
statecode=\'\".intval($getStateCode).\"\'
\";
$s2 = \"SELECT *
FROM county
WHERE
statecode=\'\".intval($getStateCode).\"\'
AND
countycode=\'\".intval($getCountyCode).\"\'
\";
$s3 = \"SELECT *
FROM town
WHERE
statecode=\'\".intval($getStateCode).\"\'
AND
countycode=\'\".intval($getCountyCode).\"\'
AND
towncode=\'\".intval($getTownCode).\"\'\";
$s4 = \"SELECT *
FROM villages
WHERE
statecode=\'\".intval($getStateCode).\"\'
AND
countycode=\'\".intval($getCountyCode).\"\'
AND
towncode=\'\".intval($getTownCode).\"\'
AND
villagecode=\'\".intval($getVillageCode).\"\'\";
是否可以在一条语句中连接我的所有表?让我知道。
没有找到相关结果
已邀请:
3 个回复
抵舵
嫩昧竞莫
诉嘎归亮