> ><cfquery name="OutputUnitContent" datasource="camp" dbtype="ODBC">
> >     Select top 1 *
> >     from UnitPages
> >     where ArticleUnit = '#form.units#'
> >     order by ArticleDate DESC
> ></cfquery>
> >
> >This will literally return the top row, and nothing else
>
> Thats Sql Server only (access too?) . <cfquery maxrows=1> might be better

It's pretty much all SQL flavors - Access does it

And, as I said, maxrows can cause speed issues if you have loads of rows,
but only let CF display one - some of my tables have tens of millions of
rows - can you imagine getting all of that to CF to let it display the first
one?

Philip Arnold
Director
Certified ColdFusion Developer
ASP Multimedia Limited
T: +44 (0)20 8680 1133

"Websites for the real world"

**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**********************************************************************


> -----Original Message-----
> From: JustinMacCarthy [mailto:[EMAIL PROTECTED]]
> Sent: 09 January 2001 12:32
> To: CF-Talk
> Subject: RE: <cfquery>
>
>
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to