Posted: July 31, 2006 at 6:00 PM by Ben Nadel
I recently had to step in as the lead ColdFusion programmer on a project while my co-worker was on vacation. Apparently, I did a good job as this was what was sent to my boss: "Ben has been such a tremendous help in Martin's absence. Just wanted to let you know how much we appreciate his professionalism and prompt attention to the post-launch iss... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 31, 2006 at 3:22 PM by Ben Nadel
Not really that interesting, but you can destroy variables by setting them equal to the result of a JavaCast() to "null". I have beeing some testing with null values in ColdFusion lately and I did this for a goof: <!--- Create the objFoo variable. ---> <cfset objFoo = StructNew() /> <cfset objFoo.Bar = "Well Played!" /> ... read more »
Comments (1) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 31, 2006 at 3:07 PM by Ben Nadel
A while back, I had blogged about how if you build a query from scratch in ColdFusion using the QueryNew() and QueryAddRow() and do NOT define some of the cell values, errors will be thrown when you try to use the LIKE directive as well as the UPPER() and LOWER() functions. After some further thought, I wanted to know what is in that cell value.... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 31, 2006 at 8:01 AM by Ben Nadel
I know that ColdFusion is case insensitive by nature. It had never occurred to me though that conditional statements were also case insensitive. I am such a huge user of ListFind() and Compare(), both of which are case SENSITIVE, that I just started to assume that all conditionals were case sensitive. That's the reason why my custom tags end up lo... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 28, 2006 at 5:33 PM by Ben Nadel
This isn't really a big thing here. For the first time ever, I tried using the Javascript IF statement short hand inside of an array call. I had no reason to think that this wasn't possible, it's just kind of cool to see it work: <script type="text/javascript"> // Create an array of friends. var arrFriends = new Array( "Molly", ... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 28, 2006 at 10:54 AM by Ben Nadel
I finally got around to donating to the web site Lorem Ipsum . I use it all the time and am more than happy to give back. For those of you who have never used it, it's a really small, simple site that provides latin text for use as dummy copy on beta web sites. That's it. It almost too simple. For those of you who have never heard the phrase "Lor... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 28, 2006 at 8:15 AM by Ben Nadel
How can I average dates in a SQL call? There are several types of date/time averaging in SQL. You can either average the date/time stamp as a whole, the date part of the date/time stamp, or the time portion of the date/time stamp. While I don't necessarily feel like all of those are worth discussing (due to usefulness), since I am not sure about ... read more »
Comments (5) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 27, 2006 at 4:21 PM by Ben Nadel
I use the IN directive a lot in SQL, especially in conjunction with ValueList()'s of IDs. I was working on a query today that was dealing with thousands of IDs and I got curious as to how the IN directive compared to a more labor-intensive grouping or OR clauses. To me, the IN directive is elegant, but if it's slow, I wouldn't mind writing out the... read more »
Comments (3) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 27, 2006 at 9:17 AM by Ben Nadel
I just added links for previous and next blog posts at the bottom of every blog entry detail page. I stumbled a bit when trying to query for the previous and next posts because of the way I store the date and time of posting in the database. Over time I have learned it is easier to store date and time separately where date is in a DATETIME field (... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 26, 2006 at 6:27 PM by Ben Nadel
How can I select the month part of date value in SQL server? I get this type of question a lot: How can I select the hours from the date in SQL? How can I get the day of the year from a date? How can I get the day of the month from a date? For all of these, the easiest solution would be to use SQL Server's built in date/time function: DatePart().... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 26, 2006 at 1:16 PM by Ben Nadel
As I posted earlier, I was having some funkiness with XStandard caching data and showing up duplicates of stuff. I had originally thought that since my debugging (my custom XStandard configuration) was turned on, it was some how hamstringing XStandard on LARGE SOAP responses. I found out that this is not the case; after a temporary fix, the weir... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 26, 2006 at 12:01 PM by Ben Nadel
Our SeeFusion reports were breaking for the last few days and my co-worker Marak just figured out why; we host a site for a friend of the company and it turns out his site had about 11 hanging processes, some of which had been running for over 3 days. This apparently was crazy enough to stop SeeFusion dead in its tracks. SeeFusion is supposed to s... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 26, 2006 at 9:04 AM by Ben Nadel
The other day I had mentioned that someone posted a great tip about running ColdFusion array functions on query columns . After some testing I had come across the fact that column notation made a huge difference. For example, <cfset flSum = ArraySum( qGirls[ "weight" ] ) /> ... works, but the following, <cfset flSum = ArraySum... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 26, 2006 at 8:03 AM by Ben Nadel
I am just testing out XStandard's ability to add xhtml code templates. For instance, I have a the template file _image_border.cfm that has the code: <table width="100%" border="0" cellspacing="0" cellpadding="0" class="imageborder"> <tr> <td width="50%" rowspan="3"> <br /> </td> <td class="nw"> &n... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: July 25, 2006 at 3:32 PM by Ben Nadel
For those of you who don't follow the House of Fusion CF-Talk list, Chris Peterson just posted a message about running ColdFusion array methods on query columns . This is new for me, I had no idea that you could do this. It is very exciting (I agree). However, after some brief testing, I have found there to be a few caveats. Let's assume we hav... read more »
Comments (5) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink