1

我想知道是否可以将这个原始 SQL 更改为 CodeIgniter 的 Active Record 样式?

$SQL = "SELECT DISTINCT c.ID, c.Title, c.VersionInfo, GROUP_CONCAT(DISTINCT i.FullName
ORDER BY cma.Ranking SEPARATOR ', ') AS Artists
FROM carriermodifications cm INNER JOIN carriers c ON cm.CarrierID=c.ID
LEFT JOIN carriermainartists cma ON cma.CarrierID=c.ID
LEFT JOIN identities i ON cma.IdentityID=i.ID
INNER JOIN carriermainartists scma ON scma.CarrierID=c.ID
INNER JOIN identities si ON scma.IdentityID=si.ID
WHERE cm.DataSourceID IN (16, 17) AND c.Verified=1 AND c.Hidden = 0 AND ((c.Filter & 1)=1)
AND (si.Nationality=2 OR c.Concept=4)
GROUP BY c.ID ORDER BY cm.ModificationDate DESC LIMIT 27";

非常感谢提前

4

0 回答 0