[eluser]Wathfea[/eluser]
[quote author="joergy" date="1405023094"]Active record is for very simple queries. It has problems parsing expressions like "(t.typeName LIKE '%Navy%' OR t.typeName LIKE '%Fleet%')"
Use $this->db->last_query(); to look what CI makes out of Your statement.[/quote]
Hello!
Thx for your respon, the problem is what I tried to wrote down before, The active record miss the () out from the SQL.
This is the result of the last query:
Code:
SELECT t.typeID, t.typeName, t.jitaAvgPrice, g.groupName, tp.ticketPrice, t.active
FROM invGroups AS g
INNER JOIN invTypes AS t ON g.groupID = t.groupID
INNER JOIN ticketPrice AS tp ON g.groupName = tp.shipClass
LEFT OUTER JOIN invMarketGroups AS m ON t.marketGroupID = m.marketGroupID
WHERE g.categoryID =7
AND t.published =1 AND t.typeName LIKE '%Navy%' OR t.typeName LIKE '%Fleet%'
ORDER BY t.typeName ASC