[eluser]domainsvault[/eluser]
Ill spare for the most part the entirety as its not particularly important to the query itself in question.
Code:
$currentUserFromGroup = $row->user_id;
$sql = "SELECT * FROM cm_idea WHERE user_id = ? ORDER by created DESC LIMIT 5";
$ideaQuery = $this->db->query($sql, array($currentUserFromGroup));
foreach($ideaQuery->result() as $rowX){
/*code that builds an array to sort from based on users grouped within certain groups sorts the array for chronological order then json encodes it for output as its an ajax driven element. I am working on*/
}
That said, the query works I get my results, however if I reload the page, or even sign out then back in as a different user whose comments should be different based on the users they have in there list (also mind you, the comments do pull differently after a little while if i sign out and back in) so for all intensive purposes the code does what its supposed to do.. It just seems its caught in some type of cache somewhere. CI being fairly new to me I am curious all around as to how this happens.
Mind you with this I am also coming in on a project about 2 months into build time do not know the full scope of everything that is the system they developed as of yet, and chances are its going to be completely rebuilt by me in upcoming months, just right now I have to work with what I was given.. that said it is plausible that someone did flip the metaphorical switch on that cache concept, which that be the case brings me back to is there a way to bypass said caching with just what I am working on so I don't effect things that may require the caching thats already been developed?
Or i could be wrong and you right, where my query is messed up somewhere. But as I said generally speaking the query works, pulls the right data out sorts it right and does everything as expected, only thing thats happening is if i refresh the page go to a different page where I have plugged in a similar feature. The query generally leaves the same result time and time again even with new comments in the system added since the initial query was given