CodeIgniter Forums
Can I improve on this query handling? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Can I improve on this query handling? (/thread-49517.html)



Can I improve on this query handling? - El Forum - 02-22-2012

[eluser]meigwilym[/eluser]
I've got a simple blog engine with posts comments and tags.

My model calls in a post and also gets its comments and tags. For each post a number of records are retrieved depending on the amount of comments and/or tags.

I've got a loop going that returns a more usable array, but I'm sure there's a better way.

Here's the code http://snipt.org/uSR4#expand

I find the overwrting of the post data every time very wasteful - is there a better way?

Many thanks,

Mei