Apparently I accidentily erased a line of text from my response.

You can do the regex OR do the listfirst example.  If the regex is the way
that you had wanted to go, then I would ask for someone more familiar with
building them to chime in with a good example for this situation.

William

-- 
William E. Seiter
 
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Enter passkey: goldengrove
 
Web Developer 
http://William.Seiter.com

-----Original Message-----
From: William Seiter [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 24, 2007 10:28 PM
To: CF-Newbie
Subject: RE: cf query

When you say 'the first row', are you meaning the first line of text from
each article returned?  Or are you referring to all of the text from the
first article in the result?

If you are referring to all the text in the first result, you can do it the
way that JJ mentioned:
<cfoutput>
#GetArticle.text#
</cfoutput>


If you mean to say the first line of text from each result set, then I would
create a regular expression (regex) to find all of the text to the left of
the first sentence end.  (denoted by a period, question mark, exclamation
point) 
<cfoutput QUERY="GetArticle">
#ListFirst(text, chr(10)chr(13))#
</cfoutput>
Which will output the text on the first line, prior to the first 'carriage
return'.

William
-- 
William E. Seiter
 
Have you ever read a book that changed your life?
Go to: www.winninginthemargins.com
Enter passkey: goldengrove
 
Web Developer 
http://William.Seiter.com
-----Original Message-----
From: John Barrett [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 24, 2007 7:45 PM
To: CF-Newbie
Subject: cf query

Hi,
I am trying to figure out how to display only one row?
Thanks
I have a database with information about health articles, such as title,
article, date, etc. I am trying to display just the first roe, or just the
4th row of the article filed. I can't seem to get this. 
Hopefully somebody can help:)
Here is my query:
<!--- Query The Database for the articles --->
<CFQUERY NAME="GetArticle" DATASOURCE="my_DSN">
   SELECT          *
   FROM             my_DSN
   ORDER BY      article
</CFQUERY>

<CFOUTPUT QUERY="GetArticle">
#text#






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get involved in the latest ColdFusion discussions, product
development sharing, and articles on the Adobe Labs wiki.
http://labs/adobe.com/wiki/index.php/ColdFusion_8

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3160
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to