JOIN (
SELECT RFQs.ID,
GROUP_CONCAT(Supplier**s**.Name) AS Suppliers
FROM RFQs
LEFT JOIN RFQsSuppliers ON RFQs.ID = RFQsSuppliers.RFQID
JOIN Suppliers ON RFQsSuppliers.SupplierID = Suppliers.ID
GROUP BY RFQs.ID
) RFQsSuppliers
Попробуйте это
Я полагаю, что вы пропустили 's' в имени таблицы GROUP_CONCAT, так как оно было указано как Supplier.Name вместо Suppliers.name согласно таблице
Редактировать
Кроме того, вы ссылаетесь на RFQs.LastEdited в предложениях WHERE и ORDER BY, однако вы добавили в таблицу RFQ для именования Pullero, поэтому их нужно будет изменить на Pullero.LastEdited
Отредактировано редактировать Переформатировано, чтобы использовать СОЕДИНЕНИЯ вместо SUBQUERY
SELECT
Pullero.DateAdded as DateAdded,
Customers.Name as customer,
Pullero.ID as RFQID,
GROUP_CONCAT(Suppliers.Name) AS Suppliers,
Ships.Name as ship,
Pullero.CustomerRef as CustomerRef,
Contacts.FirstName as contactF,
Contacts.LastName as contactL,
Contacts.Email as contactE,
Users.tunnus as handler,
RFQStatus.Name as status,
Pullero.Description as RFQDescription,
Pullero.LastEdited as LastEdit
FROM RFQs AS Pullero
LEFT JOIN RFQsSuppliers ON RFQsSuppliers.RFQID = Pullero.ID
LEFT JOIN Suppliers ON RFQSuppliers.SupplierID = Suppliers.ID
LEFT JOIN Ships ON RFQ.ShipID=Ships.ID
LEFT JOIN Contacts ON RFQ.ContactID=Contacts.ID
LEFT JOIN Customers ON RFQ.CustomerID=Customers.idCustomers
LEFT JOIN Users ON RFQ.PriJobHandler=Users.id
LEFT JOIN RFQStatus ON RFQ.StatusID=RFQStatus.ID
WHERE Pullero.LastEdited > '$lastedited'
ORDER BY Pullero.LastEdited ASC
Или для примера, использующего оригинальный подзапрос, ссылка RFQ кажется превосходной, поэтому я настроил ее + добавил список поставщиков в вывод
$result = mysql_query("SELECT Pullero.DateAdded as DateAdded,
RFQsSuppliers.Suppliers,
Customers.Name as customer,
Pullero.ID as RFQID,
Ships.Name as ship,
Pullero.CustomerRef as CustomerRef,
Contacts.FirstName as contactF,
Contacts.LastName as contactL,
Contacts.Email as contactE,
Users.tunnus as handler,
RFQStatus.Name as status,
Pullero.Description as RFQDescription,
Pullero.LastEdited as LastEdit
FROM RFQs Pullero
JOIN (
SELECT RFQsSuppliers.RFQID,
GROUP_CONCAT(Suppliers.Name) AS Suppliers
FROM RFQsSuppliers.RFQID
JOIN Suppliers ON RFQsSuppliers.SupplierID = Suppliers.ID
GROUP BY RFQsSuppliers.RFQID
) AS RFQsSuppliers ON Pullero.ID = RFQsSuppliers.RFQID
LEFT JOIN Ships ON RFQ.ShipID=Ships.ID
LEFT JOIN Contacts ON RFQ.ContactID=Contacts.ID
LEFT JOIN Customers ON RFQ.CustomerID=Customers.idCustomers
LEFT JOIN Users ON RFQ.PriJobHandler=Users.id
LEFT JOIN RFQStatus ON RFQ.StatusID=RFQStatus.ID
WHERE Pullero.LastEdited > '$lastedited'
ORDER BY Pullero.LastEdited ASC
") or die(mysql_error());
РЕДАКТИРОВАТЬ Обновлен запрос для второй части вопроса
$result = mysql_query("SELECT RFQs.ID, GROUP_CONCAT(Suppliers.Name) as Suppliers
FROM RFQs
LEFT JOIN RFQsSuppliers ON RFQs.ID=RFQsSuppliers.RFQID
LEFT JOIN Suppliers ON RFQsSuppliers.SupplierID=Suppliers.ID
GROUP BY RFQs.ID
") or die(mysql_error());