Welcome Guest, Not a member yet? Register   Sign In
ActiveRecord - What's wrong with this statement?
#7

[eluser]stormbytes[/eluser]
[quote author="tonanbarbarian" date="1287901783"]tell us the exact query you expect it to produce
and then run the following command after the ->db->get() and see what the query is actually producing
Code:
echo $this->db->last_query();
[/quote]

I expect it to access the 'Revisions' table, retrieve the 'date' field, format the date field like I expressed, retrieve the revisions field, and return the data to the controller that called it.

Frankly I'm really stumped.

This query works just fine in mysql client locally -

In fact, it actually half-works in CI. It retrieves the data from the revision field but the date field is generating an error. I'm guessing it's got something to do with the single-quotes as I've executed similar functions in other queries without a problem.


Messages In This Thread
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 04:54 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 05:15 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 05:58 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 06:00 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 06:32 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 07:29 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 07:32 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 07:34 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-23-2010, 07:37 PM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-24-2010, 02:16 AM
ActiveRecord - What's wrong with this statement? - by El Forum - 10-24-2010, 02:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB