Title: Message
tried that, it orders by the storyheading eg:"187, 190, 200"
 
i want it to order by the list: "187, 200, 156"
 
 
-----Original Message-----
From: Beattie, Barry [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 September 2003 11:45 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Order by Lists variables

so what does this do for you?
 
<cfset dataPageID="2312">
<!--- run query using the list info above --->                 
<cfquery name="qgetTreatments" datasource="#application.DSN#">
SELECT  STORYHEADING, STORYHTML
FROM    #Application.tablePrefix#TABLESTORY
WHERE   PAGEID = '#dataPageID#'
AND      STORYHEADING IN (#treatment#)
 
ORDER BY STORYHEADING  
</cfquery>
 
cheers
barry.b
-----Original Message-----
From: Hickman, Matt [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 September 2003 11:42 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Order by Lists variables

The data in on SQLServer2000
 
I want to order by the list, which is in fact the "storyheader" not PK, or date.
 
 
-----Original Message-----
From: Phil Evans [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 10 September 2003 11:39 AM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Order by Lists variables

Matt,
 
You will need the order by clause to guarantee the order you want.
Depending on the dbms, (and time of day and phase of the moon), the default order can be:
1. Order records were created
2. Primary key order
3. Last modified date
4. Index being used to access records
 
Basically, if the order is important, put an ORDER BY clause on your select.
 
Phil.
 
----- Original Message -----
Sent: Wednesday, September 10, 2003 11:28 AM
Subject: [cfaussie] Order by Lists variables

Hi all quick one hopefully,

Look at my code below and tell me why my cfdump is not odering the query based on the list?? If I don't use the "ORDER BY" clause in my SQL does the query use a default ordering or should the list be defining the order??? Can i use the list as the "ORDER" instead???


<cfif #URL.treatment# is "VIP">
<cfset treatment="187, 948, 968, 958, 973, 963, 969, 953, 977">
</cfif>
                                                               
<cfset dataPageID="2312">
<!--- run query using the list info above --->                 
<cfquery name="qgetTreatments" datasource="#application.DSN#">
SELECT  STORYHEADING, STORYHTML
FROM    #Application.tablePrefix#TABLESTORY
WHERE   PAGEID = '#dataPageID#'
AND      STORYHEADING IN (#treatment#)  
</cfquery>

Here's the output of my dump:

STORYHEADING STORYHTML
187 Welcome to Vodafone. As you are a VIP customer, we will be with your shortly
977 Hi, were really close to speaking with you. We're sorry for the delay and wont be long
973 As we race to answer your call, did you know that formula 1 world champ, Michael Schumacher holds the record for the most races won by any driver? 67 and counting!
969 Thanks for waiting, were flat out at the moment, we'll be at your service as soon as possible
968 Thanks for waiting, were flat out at the moment but someone will be right with you
963 Snap a pxt in brilliant colour! Add a txt message and a voice or music clip! And send it straight to your friends vodafone live mobile! Check out vodafone.com.au for an interactive demo, or chat to us now
958 Stay tuned with a choice of over 1600 awesome polyphonic ringtones with Vodafone live. From pop to rock, hip hop to dance. Now that's a serious amount of music
953 How would you like your voicemail to ring you when you have a new message? To activate ring alert, just dial 1219 which is free from your mobile!
948 How would you like your voicemail to ring you when you have a new message? To activate ring alert, just dial 1219 which is free from your mobile!



**********************************************************************
A new world of colour, sound and pictures awaits you:
Vodafone Live! More details at http://www.vodafone.com.au/live/

**********************************************************************"
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information or both. "
No confidentiality or privilege is waived or lost by any "
mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You
must not disclose, copy or rely on any part of this correspondence
if you are not the intended recipient.

Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to
be the views of Vodafone.

This email has been checked for viruses.
**********************************************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


**********************************************************************
A new world of colour, sound and pictures awaits you:
Vodafone Live! More details at http://www.vodafone.com.au/live/

**********************************************************************"
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information or both. "
No confidentiality or privilege is waived or lost by any "
mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You
must not disclose, copy or rely on any part of this correspondence
if you are not the intended recipient.

Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to
be the views of Vodafone.

This email has been checked for viruses.
**********************************************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/


**********************************************************************
A new world of colour, sound and pictures awaits you:
Vodafone Live! More details at http://www.vodafone.com.au/live/

**********************************************************************"
This correspondence is for the named person's use only. It may
contain confidential or legally privileged information or both. "
No confidentiality or privilege is waived or lost by any "
mistransmission. If you receive this correspondence in error, please
immediately delete it from your system and notify the sender. You
must not disclose, copy or rely on any part of this correspondence
if you are not the intended recipient.

Any views expressed in this message are those of the individual sender,
except where the sender expressly, and with authority, states them to
be the views of Vodafone.

This email has been checked for viruses.
**********************************************************************************************
---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]

MX Downunder AsiaPac DevCon - http://mxdu.com/

Reply via email to