dsyk33753 2019-02-19 10:18
浏览 574

INNER JOIN有多个表

I Have PHP Script That SELECT FROM 7 Tabels and client_id is the Common Column And Return Single Tebel With all the clients by as there client_id row after row, now The problem is the if there is in one Tabel tow rows with 2 duplicate id That's print duplicate rows like 100 times

maybe i don't do INNER JOIN right or something if someone has an idea how to prevent this

$stmt = $pdo->query("SELECT * FROM client_form cf
 INNER JOIN client_form_2 cf2 ON cf.client_id = cf2.client_id
 INNER JOIN client_form_3 cf3 ON cf.client_id = cf3.client_id
 INNER JOIN client_form_4 cf4 ON cf.client_id = cf4.client_id
 INNER JOIN client_form_5 cf5 ON cf.client_id = cf5.client_id
 INNER JOIN client_form_6 cf6 ON cf.client_id = cf6.client_id
 INNER JOIN client_form_7 cf7 ON cf.client_id = cf7.client_id
");
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
    • ¥15 ubuntu虚拟机打包apk错误
    • ¥199 rust编程架构设计的方案 有偿
    • ¥15 回答4f系统的像差计算
    • ¥15 java如何提取出pdf里的文字?
    • ¥100 求三轴之间相互配合画圆以及直线的算法
    • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
    • ¥15 名为“Product”的列已属于此 DataTable
    • ¥15 安卓adb backup备份应用数据失败
    • ¥15 eclipse运行项目时遇到的问题