第一个表
、
第二个表
、
第三个表
、
、
第一个第二个表中的id与第三个表中的fid是关联的。 我想根据第三个表中的fid查询出第一表中的title, description,cover_id 与第二个表中的peice , isbn ,publisher。请问这要怎么写?我有用join查询写过,可是只查询出了一半的结果。
回复讨论(解决方案)
select * from 表三 a left join 表一 b on a.fid=b.id left join 表二 c on a.fit=c.id where a.fid=$fid
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn