Heh. I don't know why I don't like <cfif len(something)> in the same manner
I don't like <cfif recordcount>, but anywayze... ;-]

<cfset dis_reward_description = Replace(Trim(reward_description),
Chr(10),"<br /> ","ALL")>
<cfif len(dis_reward_description) gt 97>
  #left(dis_reward_description,97)#...
<cfelseif len(dis_reward_description) gt 0>
  #dis_reward_description#
</cfif>

And you may consider a fixed-width font so the kerning(sp?) doesn't
defeat this attempt at making things "even".

I left the query name off, as it maybe "should be", so long as it's in
the main query loop.
    Otherwise, you'd want someQ.someField[someQ.currentrow], I
think.  I don't know.  I'm not the best practicer of scoping by a long
shot.

Hehehe,
-Denny

On 10/8/06, terry yee <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Am calling text from datasource and need to display only a small portion of 
> it. ie. first 100 characters etc..
>  my code:
>
> <cfif len(getRewards.reward_description)>
>             #Replace(Trim(getRewards.reward_description), Chr(10), "<br> " , 
> "ALL")# </cfif>
>
> cheers
> terry

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:255937
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to