PCHomepage
Programmer
I am trying to fetch results from three tables but I want the columns to be "on top" of one another rather than being side by side. In other words, there should be a single column with u.ID, another with both b.DarkCurr and p.Bin, the p.GreenR, p.Red, p.Blue, p.GreenB, p.RGr, p.BGb each in their own columns, and the b.HistCounts and p.Total in the last column. Can this be done and how?
Code:
SELECT
u.FileName AS FileName, u.ID, b.DarkCurr, p.Bin, b.HistCounts, p.GreenR, p.Red, p.Blue, p.GreenB, p.RGr, p.BGb, p.Total
FROM dcs_uploads u
INNER JOIN dcs_bench b ON u.ID = b.FileID
INNER JOIN dcs_probe p ON u.ID = p.FileID
WHERE u.ID IN (2, 3, 4, 7, 11, 8, 10, 6)