Scott Stroz
Member since Dec 11, 2008
- Profile: /members/22-scott-stroz.htm
- URL: http://www.boyzoid.com
- Comments: 21
Recent Blog Comments By Scott Stroz
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 16, 2011 at 2:57 PM
Funny..I rarely use QoQ. I can probably count on one hand the number if times I have had to use them - and most of those were likely where I had no control over the query being run OR it was to trim out info from something that creates a query object, like cfdirectory. As I have said, I prefer to ... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 15, 2011 at 3:48 PM
@Dave - I was just going to say the same thing. I bet adding an index to the singerID column will speed that query up quite a bit (should speed up the others too)... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 15, 2011 at 2:29 PM
@Louis-Phillipe - But you are still iterating over the data twice for each record. Once to populate the structures/array and once to display the data. Using my example query and <cfoutput> with the group attribute, you iterate over the data once for each record and get the same output.... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 15, 2011 at 2:02 PM
@Louis-Phillippe In your example, you are iterating over the query AND the structures/arrays you created - much more work than is necessary The last query I posted was very simple and would not be 'costly' at all. I feel safe in assuming that any DB server will process the data faster using that q... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 14, 2011 at 2:54 PM
oops...that query will need some work...I created a table with different column names and missed changing some of them. It should be: SELECT s.id, s.name, s.singerId, sgr.name AS singerName, (SELECT COUNT(singerId) FROM song WHERE singerid = s.singerId) AS singerSongCount FROM so... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 14, 2011 at 2:48 PM
@Ben - here is a simpler query. SELECT s.id, s.name, s.singerId, sgr.name AS singerName, (SELECT COUNT(artistId) FROM song WHERE artistid = s.artistId) AS singerSongCount FROM song s INNER JOIN singer sgr ON sgr.id = s.artistId ORDER BY sgr.name ASC, s.title ASC This works on MySQL, and... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 14, 2011 at 2:15 PM
The 'extra logic' needed to get the song indices would be 2 lines of code. Before the inner <cfotuput>, you add <cfset songCount = 1 />. Before the closing the inner <cfoutput> you add <cfset songCount++ /> Then you simply need: #songCount#. - #songs.name# In my opinion,... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 14, 2011 at 1:46 PM
@Ben - I am pretty sure you could do it in one query - its just that every row would contain the song count for each artist. Not perfect, I admit, but I think it better than making multiple trips to DB or using QoQ for each artist.... read more »
-
ColdFusion Query-Of-Queries vs. The Group Attribute In CFOutput
Posted on Jun 14, 2011 at 12:49 PM
First, you can nest <cfoutput> tags inside each other. The error you displayed is when you try to nest a <cfoutput> tags that have the 'query' attribute set. This is perfectly valid syntax, and will not throw an error. <cfoutput>#createUUID()# <br /> <cfoutput>#creat... read more »
-
The ColdFusion Application Server Tagline Contest ($50 Amazon Gift Card)
Posted on Jun 26, 2010 at 1:29 PM
'Because girls like this won't ride PHP: Hyptertext Preprocessor'... read more »
-
The Way Of The Warrior And The Chance Not To Be Fired
Posted on Jan 6, 2009 at 1:02 PM
@Ben - I do not think you handled this wrong in any way, even when you were not responding to the initial messages. I am going to break agreement #3 and make the assumption that these messages were designed to elict a response from you. The fact that you did not repsond is probably what escalated ... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Jan 29, 2008 at 10:31 AM
@Robert - I believe we had that conversation in IRC. It is also worth noting that when you close the browser, the session is not killed. The session will still last as long as the timeout will allow. Rather, when the browser is opened again, a NEW session is started.... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Jan 29, 2008 at 9:11 AM
@Ben - I am not really sure of the mechanism. However, I should note that the keys in the session scope are different when J2EE session variables are enabled. If you have apps that look for stuff like CFID, sessionID, etc, they could break if you enable J2EE session variables.... read more »
-
Ask Ben: Ending ColdFusion Session When User Closes Browser
Posted on Jan 29, 2008 at 8:50 AM
You can also do this by enabling J2EE session variables in CF Admin.... read more »
-
Resident Evil: Extinction Starring Milla Jovovich
Posted on Sep 30, 2007 at 8:26 PM
Personally, I never found Milla Jovovich all that attractive.... read more »
-
Guess The Coin Amount, Win Cool Prizes
Posted on Mar 23, 2007 at 1:55 PM
98.75... read more »
-
Ask Ben: Getting CSS Class Names From My CSS Data
Posted on Mar 16, 2007 at 3:48 PM
Another potential issue of allowing a user to use any/all selectors in a CSS file is the fact that, depending on the editor, it may assign class="p" to an element when chosen from the list of styles, yet if the style is only p{CSS stuff;} then the style would not be applied. Peter, if FCK applies t... read more »
-
Ask Ben: Getting CSS Class Names From My CSS Data
Posted on Mar 16, 2007 at 8:47 AM
In your example, you technically do not have any class names. In CSS class names begin with a '.' .header will style elements with an attribute of class equal to 'header' #header will style elements with an attribute of id equal to 'header' In your resulting array, there really were no classes s... read more »
-
Perhaps The Most Inspirational Speech Ever
Posted on Oct 26, 2006 at 3:53 PM
I like this one http://youtube.com/ watch?v=K92OVFeGgIE ;)... read more »