Will,

You might try specifying the table in the order by.  So it would be order by
viewed_number.times.

Hatton


-----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