[EMAIL PROTECTED] wrote:
Who cares? The sql server doesnt ... but really it comes back to the KISS

my point of this thread is that the current standard in our team (which i didnt come up with) says that sql indentation should take precidence

Just looking for ammo to convince the team the stanard should change. it bugs the crap out of me.

and its like you say, really hard to read.

So far it seems that nobody supports the SQL indentation stanard...


prinicple. The easier someone can read your code the better it is. The
greatest cost of any development is the maintenance. You ever look at your
own code from three years ago and go 'What the ...'. Im very much in
favour of the CF identation method.

my 2c


Hi All

Just wondering what everyones opinion is about formatting SQL code
withing CFQuery ? Do you think its important to preserve the indentation
of the SQL or is it more important to see the flow of the CF code inside
the tag ?

Im way more in favour of preserving cold fusion indentation. I just
think its more important to follow the logic of the code, especially
when the query gets complex and there are more <CFIF calls in there.

Pat


eg. SQL indentation is Preseved

<cfquery .....>
SELECT *
FROM table t
WHERE 0=0 <cfif isDefined("form.keyword") >
AND title like '%#title#%'</cfif><cfif listLen(form.categoryIds) >
AND category_id IN (#form.categoryIDs#)</cfif>
</cfquery>

OR 2 cold fusion indentation is preserved

<cfquery .....>
SELECT *
FROM table t
WHERE 0=0
<cfif isDefined("form.keyword") >
        AND title like '%#title#%'
</cfif>

<cfif listLen(form.categoryIds) >
        AND category_id IN (#form.categoryIDs#)
</cfif>
</cfquery>

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/







---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to