Log message #2298466

# At Username Text
# Sep 21st 2011, 13:47 dakota ~ad7six-advice
# Sep 21st 2011, 13:47 dakota Section58: Something that helps me tremendously when writing complex queries is to first write out the manual sql query in phpmyadmin (or whatever) and only then convert it to 'cake style'
# Sep 21st 2011, 13:47 Section58 why do they have to make it so complicated :(
# Sep 21st 2011, 13:47 Section58 if the query just grabs events then it would be one line
# Sep 21st 2011, 13:46 Section58 i think the orignal filtering is putting it off
# Sep 21st 2011, 13:46 dakota but you could do it with joins.
# Sep 21st 2011, 13:46 dakota containable is basically an intellegent wrapper around $recursive
# Sep 21st 2011, 13:46 dakota recursion would give you the same result
# Sep 21st 2011, 13:45 Section58 and not use contains
# Sep 21st 2011, 13:45 Section58 so maybe i can use recurtion and joins
# Sep 21st 2011, 13:45 dakota that is true
# Sep 21st 2011, 13:45 Section58 well normally i have found there are many ways to do the same thing in php
# Sep 21st 2011, 13:45 dakota )
# Sep 21st 2011, 13:45 dakota ~premature
# Sep 21st 2011, 13:45 dakota ~linkable
# Sep 21st 2011, 13:45 dakota You could maybe look at linkable, but I'm not sure if it will work like you want. Plus, I've never used it
# Sep 21st 2011, 13:44 Section58 in my attempt to keep querys down, i apear to have made them worse
# Sep 21st 2011, 13:44 dakota Section58: yeah
# Sep 21st 2011, 13:44 Section58 where it should be just 5
# Sep 21st 2011, 13:44 Section58 well logically it will do that 1 time for each event matching an artist, cause here is 5 artists in that call, thats 25 lines of sql
# Sep 21st 2011, 13:44 dakota anyways, to directly answer your question, you'd need to switch to using joins/hasOne binds
# Sep 21st 2011, 13:43 dakota small times
# Sep 21st 2011, 13:43 dakota Doesn't look that bad
# Sep 21st 2011, 13:43 Section58 cause its not so awesome for perforance
# Sep 21st 2011, 13:43 Section58 how do i go about tidying that up
# Sep 21st 2011, 13:43 dakota unfortunately
# Sep 21st 2011, 13:43 dakota Section58: you can't really. It's just how containable works
# Sep 21st 2011, 13:43 Section58 yeah er, 'if containable looks like that'
# Sep 21st 2011, 13:42 dakota Section58: no, I seriously thought you were refering to the appearance of the sql dump, rather than the queries
# Sep 21st 2011, 13:42 Section58 are you guys going to double team me again
# Sep 21st 2011, 13:42 Section58 cayse those querys are not needed
# Sep 21st 2011, 13:42 dakota Section58: by 'this' I thought you were referring to the sql dump :)
# Sep 21st 2011, 13:41 Section58 ok, so, how can i stop contain from being so active?
# Sep 21st 2011, 13:41 Section58 then i wouldn't beable to see it haha
# Sep 21st 2011, 13:41 dogmatic69 Section58: that is not repeating, that is containable in action
# Sep 21st 2011, 13:41 dakota Section58: remove $this->element('sql_dump'); from your layout
# Sep 21st 2011, 13:40 franki thanks
# Sep 21st 2011, 13:40 dakota ~tell franki about debugKit
# Sep 21st 2011, 13:40 Section58 http://bin.cakephp.org/view/818608412 How do i stop this repeating at the bottom ?
# Sep 21st 2011, 13:40 daVinciWanaB incredibly easy to install - most people I talk to say they get it before starting any project
# Sep 21st 2011, 13:39 daVinciWanaB yah