• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

db variables field

New Here ,
Oct 08, 2007 Oct 08, 2007

Copy link to clipboard

Copied

need some help. I have a field in a table that I use to dynamically build a src for <a href> (let's call it "link_var") What is retained in the link_var field is a string to append to a url links together variables. An example of a db entry would be "ID=#ID#&test=#test#" In a cfoutput of a query, how do i get the variable string to write correctly (giving me the variables & values of each row).
The method below is not working returns the string literally and double escapes the last pound sign:
<cfoutput query="test">
<a href src=" http://localhost/test/index.cfm?#link_var#">test</a>
</cfoutput>
I may have a solution requiring breaking the field down into lists and using evaluate() but i want to see if there is an easier way

Any help is appreciated.
DJ
TOPICS
Advanced techniques

Views

215

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 08, 2007 Oct 08, 2007

Copy link to clipboard

Copied

LATEST
dizzyjay3268 wrote:
> need some help. I have a field in a table that I use to dynamically build a
> src for <a href> (let's call it "link_var") What is retained in the link_var
> field is a string to append to a url links together variables. An example of
> a db entry would be "ID=#ID#&test=#test#" In a cfoutput of a query, how do i
> get the variable string to write correctly (giving me the variables & values of
> each row).
> The method below is not working returns the string literally and double
> escapes the last pound sign:
> <cfoutput query="test">
> <a href src=" http://localhost/test/index.cfm?#link_var#">test</a>
> </cfoutput>
> I may have a solution requiring breaking the field down into lists and using
> evaluate() but i want to see if there is an easier way
>
> Any help is appreciated.
> DJ
>

not sure if this works or not - have not tested it - , but try:
#de(link_vars)#
or
#evaluate(de(link_vars))#

--

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation