Welcome Guest, Not a member yet? Register   Sign In
Active record problem
#3

[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


Messages In This Thread
Active record problem - by El Forum - 07-09-2014, 03:34 AM
Active record problem - by El Forum - 07-10-2014, 01:11 PM
Active record problem - by El Forum - 07-12-2014, 07:23 AM



Theme © iAndrew 2016 - Forum software by © MyBB