Your ORDER BY needs to be  ORDER BY TABLE.TIMES  because you returned all of
the columns with  *  .

Thank You,
Peter

Peter J. MacDonald II
Creative Computing, Inc.
100 Middle Street
Lincoln, RI 02865
Phone: 401.727.0183 x123
Fax: 401.727.4998
Portable: 401.965.3661
E-MAIL: [EMAIL PROTECTED]
Web Page: www.creatcomp.com



-----Original Message-----
From: W Luke [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 04, 2001 3:45 PM
To: CF-Talk
Subject: "Order By" being ignored


Hi,

I hope someone can point me in the right direction for thie query...

Querying 2 tables, and I want to order the results from the
viewed_numbers.times table, in descending order.  So I did this (using * as
the tables are both small)

<cfquery name="getadvert" datasource="localads">
 SELECT * FROM advert_details, viewed_numbers
 WHERE advert_details.ID = viewed_numbers.adID
 ORDER by times DESC
 </cfquery>

It returns the results, but isn't following my ORDER by statement - they
appear to be randomly displayed.

What am I doing wrong?

Cheers

Will
--
[EMAIL PROTECTED] -=- www.lukrative.com
Local-Advertising -=- www.localbounty.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to