Re: scopes

2009-03-25 Thread Seb Duggan
If I ever need to do this, I just use: cfset FORM = URL / You don't need to duplicate the Struct, as you're not going to have any problems with the original URL data changing throughout the lifetime of the page. Seb On 25 Mar 2009, at 16:17, Adrian Lynch wrote: I'm not sure if you're

Re: What the heck is happening during CFQUERY?

2009-03-09 Thread Seb Duggan
Yeah, but what are you going to do with 300,000 actual records in a single recordset? In his original post, Claude never specified what the requirements of his CFQUERY were - if we knew what he was trying to achieve, we could provide better advice on how to do it... On 9 Mar 2009, at

Re: What the heck is happening during CFQUERY?

2009-03-09 Thread Seb Duggan
What we are really talking about here is having the right tool for the job. dBase, Clipper and FoxPro are all database management systems, and so are designed to work efficiently in examples like the one you are citing. ColdFusion is a Web Application server, designed to interact with a

phpBB to Galleon migration?

2009-03-08 Thread Seb Duggan
(although it's working now.) I'd really like to move to a CFML-based forum, but my client has a fairly sizeable archive of posts (recently passed 300,000), so retaining all these is essential. [Who knew there was that much to say about making cards and parchment craft...] Seb Seb Duggan Web

Re: What the heck is happening during CFQUERY?

2009-03-08 Thread Seb Duggan
to that. It is highly unlikely that you actually need to work with 300,000 records at one time... Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 8 Mar 2009, at 22:42, Claude Schneegans wrote: Hi, I've always thought

Re: FireFox getElementById issue?

2009-02-16 Thread Seb Duggan
, not its value (which doesn't actually exist), at this point. So: var list = document.getElementById(MemberName); Your list then has an array of options, and the rest of the code should work fine. Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w

Re: Need ISAPI rewrite help...

2009-02-09 Thread Seb Duggan
On 9 Feb 2009, at 01:44, Will Tomlinson wrote: Thanks Seb! So I could say: RewriteRule ^calendarDetails\.html/[A-Za-z]+/([0-9]+)$ / calendarDetails.cfm? EID=$1 [NC] Make sure there's no space before the ? Yes, or even: RewriteRule ^calendarDetails\.html/([A-Za-z]+)/([0-9]+)$ /

Re: Need ISAPI rewrite help...

2009-02-08 Thread Seb Duggan
a RewriteCond. There are a number of other differences too. If you post exactly what you want converted to what, I can give you some more precise pointers... Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 7 Feb 2009, at 17:21

Re: Need ISAPI rewrite help...

2009-02-08 Thread Seb Duggan
value in the querystring varies, you could use a regex for that too). Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 8 Feb 2009, at 23:16, Will Tomlinson wrote: What version of ISAPI Rewrite are you using? The tutorial

How are CFCONTENT requests handled?

2009-02-06 Thread Seb Duggan
... Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http

Re: How are CFCONTENT requests handled?

2009-02-06 Thread Seb Duggan
Thanks Nathan. I'm currently trying to work out a solution using ISAPI_Rewrite to modify the headers, but can't quite get it to work yet... On 6 Feb 2009, at 20:29, Nathan Strutz wrote: Seb, It is most likely that CF will open the file you are delivering, however, it will probably

Re: conditional cfloop

2009-01-05 Thread Seb Duggan
, then it will evaluate the second half of the condition. Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 5 Jan 2009, at 13:31, daniel kessler wrote: I'm trying to create a conditional cfloop that has two conditions

Re: MySQL - Trying to query x days back

2008-12-28 Thread Seb Duggan
I would use the DATEDIFF() function: SELECT DATE(orderdate) AS thedate, SUM(ordertotal) AS ordersubtotal FROM tblOrders WHERE DATEDIFF(current_date(), orderdate) = 30 GROUP BY DATE(orderdate) (I think this should work; I use MSSQL, so can't test this...) Seb Seb Duggan Web ColdFusion

Re: Variable within a variable

2008-12-27 Thread Seb Duggan
to be included; the variables within them get processed as normal. Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 27 Dec 2008, at 13:14, Maya MacDonald wrote: How can you display a variable within a variable? I have a client

Re: Variable within a variable

2008-12-27 Thread Seb Duggan
is updated. But I've also used Dominic's method of replaceing a [variable] token in the template using Replace(). Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 27 Dec 2008, at 13:38, Maya MacDonald wrote: Seb, Thank you

re: product search query - advice needed

2008-12-16 Thread Seb Duggan
not something I've done much of myself, but it should also give you other benefits such as better returns for near matches... (If Verity isn't a good way to go for this, I'm sure someone will correct me...) Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786

Re: Would anyone care to critique my approach/code to this login scheme?

2008-12-15 Thread Seb Duggan
listings). Seb Seb Duggan Web ColdFusion Developer e: s...@sebduggan.com t: 07786 333184 w: http://sebduggan.com On 12 Dec 2008, at 17:14, Rick Faircloth wrote: Hello, all... I appreciate everyone's help in getting my first ColdFusion/Ajax/ jQuery code working for this login

Re: Re: Would anyone care to critique my approach/code to this login scheme?

2008-12-15 Thread Seb Duggan
Out of interest, how are you enabling session variables if you're not using Application.cfm or .cfc? Just enabling them in the Administrator is not enough - you need to set sessionManagement=true either in your cfapplication tag in Application.cfm, or at the start of your Application.cfc...

Re: Is there a non-aggregate Max() function in MySQL?

2008-12-14 Thread Seb Duggan
I don't have MySQL installed, but this is how I'd do it in MSSQL (and I don't see why it wouldn't work for you...): SELECT *, OrderValue = CASE WHEN MinPrice MaxPrice THEN MinPrice ELSE MaxPrice END FROM mytable ORDER BY OrderValue DESC Seb Seb Duggan Web

Re: CFLoop died help

2008-12-08 Thread Seb Duggan
, you've got a problem with your CF mail setup. Have you changed servers? Does your mail server expect a username and password? There are lots of possible mail faults... Seb Duggan Web ColdFusion Developer e: [EMAIL PROTECTED] t: 07786 333184 w: http://sebduggan.com On 8 Dec

Re: Making a Recently Viewed list

2008-11-26 Thread Seb Duggan
(if it's in the list) --- cfif i gt 0 Product ID: #AllProducts.ProductID[i]# Product Name: #AllProducts.ProductName[i]# ThumbNail: #AllProducts.ThumbNail[i]# /cfif /cfloop (Code not tested, but should work fine). Seb Duggan Web

Re: single quote issue

2008-11-26 Thread Seb Duggan
On 26 Nov 2008, at 14:33, Brian Dumbledore wrote: Ok Preservesinglequotes() didn't work. Got an error saying invalid construct '[' at.. All I did was to replace '#form[fn _ ocid]#' with '#preservesinglequotes(form[fn _ ocid])#'. If that's what you've typed, there's a missing :

re: convert decimal to fractions

2008-11-25 Thread Seb Duggan
= decimal * bottom / cfloop from=#top# to=1 step=-1 index=x cfif top mod x eq 0 and bottom mod x eq 0 cfbreak / /cfif /cfloop cfoutput p Your fraction is #top#/#bottom#, which simplifies to #top/x#/#bottom/x#. /p /cfoutput Seb Duggan Web ColdFusion Developer e: [EMAIL

Re: convert decimal to fractions

2008-11-25 Thread Seb Duggan
Seb That worked, but there is one problem, is there a way to simplify to a whole and a fraction. example 11.5 = 23/2 = 11 1/2 You could handle this either at the beginning or at the end; for efficiency, I'd recommend the beginning, as your loop will be shorter... cfset input = 11.5

Re: image function rounded rectangle?

2008-11-23 Thread Seb Duggan
This might be what you're looking for... http://www.melrosesolutions.com/blog/index.cfm/2008/10/20/Rounding-image-corners-in-CF8 Google is your friend ;-) Seb Duggan Web ColdFusion Developer e: [EMAIL PROTECTED] t: 07786 333184 w: http://sebduggan.com On 23 Nov 2008, at 15

Re: sql param error

2008-11-22 Thread Seb Duggan
into an ntext column. My guess is that it's this one: JeopardyExplain = cfqueryparam value=#Arguments.pJeopardyExplain# cfsqltype=cf_sql_integernull=#nJeopardyExplain# as all the other Explain columns are using cfsqltype=cf_sql_longvarchar. Hope this fixes it. -- Seb Duggan Web

Re: Re: Prevent direct access to XML data file?

2008-11-20 Thread Seb Duggan
How are you accessing your XML file? If it's being accessed via CFML, you can place it outside your webroot, and it will not be browsable... Seb Is it possible to prevent direct access to an XML datafile? Similar to verifyClient() for AJAX request, I was hoping that there was one for

Re: (Probably) Simple SQL Question?

2008-11-18 Thread Seb Duggan
What database are you using? In MS SQL 2005 you can use the RANK and PARTITION keywords: SELECT id, name, date_due, date_modified FROM ( SELECT id, name, date_due, date_modified, RANK() OVER (PARTITION BY id ORDER BY date_modified DESC) AS userRank FROM table ) AS t2 WHERE t2.userRank = 2 ORDER

Re: (Probably) Simple SQL Question?

2008-11-18 Thread Seb Duggan
If you're not using SQL 2005, the following (slightly more complex) query should simulate the RANK and PARTITION: SELECT id, name, date_due, date_modified FROM ( SELECT id, name, date_due, date_modified, (SELECT COUNT(id) FROM table T2 WHERE T1.id = T2.id AND T2.date_modified =