I've got a Active Record query which i need to grab the sql from, so i'm doing the query and then i'm doing for example
$query = $this->EE->db->select('foo')->get('bar'); $bob = $this->EE->db->last_query();
Now, on my local machine it picks it up fine. But, on the live site it's picking up a query of the exp_sites table and basically just returns the contents of the exp_sites table for this site (it's not msm so there is only one row). That's not the query i want, so how is it getting picked up there?!?!
Anyone know why this might be? Caching? A full moon?