Welcome Guest, Not a member yet? Register   Sign In
Query not working in CI 1.7 anymore?
#1

[eluser]mvdg27[/eluser]
Hi guys,

I'm updating a website right now, and I'm actually recreating a lot of code. Off course I use my old code as a reference. The old code was based on CI 1.6, and the new code is based on CI 1.7

Now I'm running into a problem with a query that used to work without any problems on 1.6, but now produces an error.

The following statement contains the error:

Code:
$this->db->select('lists.id, lists.title, users.username, count(list_views.list_id) AS views');

When I leave out the 'count' there is no error at all:

Code:
$this->db->select('lists.id, lists.title, users.username, list_views.list_id');

The error I'm receiving is:

Code:
Error Number: 1109</p><p>Unknown table 'count(list_views' in field list

Any idea how this error may be fixed?

Thanks! Michiel


Messages In This Thread
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 04:14 AM
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 04:58 AM
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 05:00 AM
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 09:13 AM
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 10:59 AM
Query not working in CI 1.7 anymore? - by El Forum - 11-27-2008, 02:33 PM



Theme © iAndrew 2016 - Forum software by © MyBB