What is a "Foreword" to a blog?
ListAppend and delimiter question
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What can I do?
• What to Read?
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Зарегистрируйся!

QAIX > ColdFusion > ListAppend and delimiter question 31 March 2005 14:52:54

  Recent blog posts: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Moderators:

ListAppend and delimiter question

Charles Heizer 31 March 2005 14:52:54
 Hello,
I have a strange question, I think. Can a delimiter be only one character?
I'm trying to do a sql statement and I wanted to use ListAppend and specify
the delimiter as "AND"

Example ...

<cfset tmpWhere = ListAppend(tmpWhere­,c,"AND")>


But when I view the list I only see "A" as the delimiter.

Is this a bug or is this how it should be?

Thanks,
- Charles



~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200766
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Sam Farmer 30 March 2005 23:19:15 permanent link ]
 I'll leave it to others to classify it as a bug or a feature.

I get around it by doing this:
<cfset tmpWhere = ListAppend(tmpWhere­,c,"~")>
and then when done with all my list appends:
<cset tmpWhere = replace(tmpWhere,"~­"," AND ","all")>

Cheers,

Sam

On Wed, 30 Mar 2005 11:07:53 -0800, Charles Heizer <heizer1-i2BcT+NCU+­M@public.gmane.org> wrote:> Hello,> I have a strange question, I think. Can a delimiter be only one character?> I'm trying to do a sql statement and I wanted to use ListAppend and specify> the delimiter as "AND">
Example ...>
<cfset tmpWhere = ListAppend(tmpWhere­,c,"AND")>>
But when I view the list I only see "A" as the delimiter.>
Is this a bug or is this how it should be?>
Thanks,> - Charles>

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble
Ticket application

http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=48

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200769
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Calvin Ward 30 March 2005 23:26:41 permanent link ]
 I believe it is documented to work this way.

- Calvin

-----Original Message-----
From: Charles Heizer [mailto:heizer1-i2BcT+NCU+M@public.gmane.org]
Sent: Wednesday, March 30, 2005 2:08 PM
To: CF-Talk
Subject: ListAppend and delimiter question

Hello,
I have a strange question, I think. Can a delimiter be only one character?
I'm trying to do a sql statement and I wanted to use ListAppend and specify
the delimiter as "AND"

Example ...

<cfset tmpWhere = ListAppend(tmpWhere­,c,"AND")>


But when I view the list I only see "A" as the delimiter.

Is this a bug or is this how it should be?

Thanks,
- Charles





~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=49

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200776
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Charles Heizer 30 March 2005 23:34:00 permanent link ]
 I had to do the same. I just wanted to make sure since the extra cfset using
the replace could add more overhead.

Thanks,
- Charles


On 3/30/05 11:19 AM, "Sam Farmer" <it.asee-Re5JQEeQqe­8AvxtiuMwx3w@public.­gmane.org> wrote:
I'll leave it to others to classify it as a bug or a feature.>
I get around it by doing this:> <cfset tmpWhere = ListAppend(tmpWhere­,c,"~")>> and then when done with all my list appends:> <cset tmpWhere = replace(tmpWhere,"~­"," AND ","all")>>
Cheers,>
On Wed, 30 Mar 2005 11:07:53 -0800, Charles Heizer <heizer1-i2BcT+NCU+­M@public.gmane.org> wrote:>> Hello,>> I have a strange question, I think. Can a delimiter be only one character?>> I'm trying to do a sql statement and I wanted to use ListAppend and specify>> the delimiter as "AND">>
Example ...>>
<cfset tmpWhere = ListAppend(tmpWhere­,c,"AND")>>>
But when I view the list I only see "A" as the delimiter.>>
Is this a bug or is this how it should be?>>
Thanks,>> - Charles>>

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200778
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Claude Schneegans 31 March 2005 05:43:58 permanent link ]
 
I get around it by doing this:
<cfset tmpWhere = ListAppend(tmpWhere­,c,"~")> >> and then when done with all my list appends: >> <cset tmpWhere = replace(tmpWhere,"~­"," AND ","all")>

How about simply:
<cfset tmpWhere = tmpWhere & " AND " & c>


--
___________________­____________________­
REUSE CODE! Use custom tags;
See http://www.contentb­ox.com/claude/custom­tags/tagstore.cfm
(Please send any spam to this address: piegeacon-H4aWS73dX­uothxE2hwVU1A@public­.gmane.org)
Thanks.


~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200872
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Keith Gaughan 31 March 2005 14:25:48 permanent link ]
 Charles Heizer wrote:
I have a strange question, I think. Can a delimiter be only one character?> I'm trying to do a sql statement and I wanted to use ListAppend and specify> the delimiter as "AND">
Example ...>
<cfset tmpWhere = ListAppend(tmpWhere­,c,"AND")>>
But when I view the list I only see "A" as the delimiter.>
Is this a bug or is this how it should be?

Nope, that's exactly how it's supposed to work.

http://livedocs.mac­romedia.com/coldfusi­on/6.1/htmldocs/func­tib4.htm

K.

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200920
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
Pete Jordan 31 March 2005 14:52:54 permanent link ]
 Sam Farmer wrote:
I'll leave it to others to classify it as a bug or a feature.

It's a feature (I think). Not that I've ever had reason to use or allow
for alternative delimiters in CF yet...
I get around it by doing this: > <cfset tmpWhere = ListAppend(tmpWhere­,c,"~")>> and then when done with all my list appends:> <cset tmpWhere = replace(tmpWhere,"~­"," AND ","all")>

FWIW, I use listchangedelims(tm­pWhere, ' AND ', '~') in similar
circumstances; it's worth noting that arraytolist() also allows a
multi-char delimiter - I often build query "where" clauses in arrays and
glue them together that way.
--
Pete Jordan
Horus Web Engineering Ltd
http://www.webhorus­.net/

~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~~~~~~~~~~~­~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoff­usion.com/banners/vi­ew.cfm?bannerid=67

Message: http://www.houseoff­usion.com/lists.cfm/­link=i:4:200924
Archives: http://www.houseoff­usion.com/cf_lists/t­hreads.cfm/4
Subscription: http://www.houseoff­usion.com/lists.cfm/­link=s:4
Unsubscribe: http://www.houseoff­usion.com/cf_lists/u­nsubscribe.cfm?user=­13123.11886.4
Donations & Support: http://www.houseoff­usion.com/tiny.cfm/5­4

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или УК РФ.


QAIX > ColdFusion > ListAppend and delimiter question 31 March 2005 14:52:54

see also:
OSX & Apache
enable-module=so
Htaccess Timeout
пройди тесты:
see also:
All in one Video Converter Platinum
Free video converter with Two real-time…
Run Fatboy Run Movie Review, A son? Did…

  Copyright © 2001—2008 QAIX
Idea: Miсhael Monashev
Помощь и задать вопросы можно в сообществе support.qaix.com.
Сообщения об ошибках оставляем в сообществе bugs.qaix.com.
Предложения и комментарии пишем в сообществе suggest.qaix.com.
Информация для родителей.
Write us at:
If you would like to report an abuse of our service, such as a spam message, please .