Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delimiters problem

Status
Not open for further replies.

achai

MIS
May 23, 2000
71
US
&lt;cfquery datasource=&quot;iru&quot; name=&quot;route&quot;&gt;<br>select table1.routefrom, table1.routeto, table1.sites, table2.sitename, table2.sitecode<br>from&nbsp;&nbsp;table1, table2<br>WHERE (table1.routefrom like '#form.routefrom#%' and table1.routeto like '#form.routeto#%')<br>and (0=1 <br>&lt;cfloop index=&quot;site&quot; list=&quot;table1.sites&quot; delimiters=&quot;,&quot;&gt;<br>or table2.sitecode='#site#'<br>&lt;/cfloop&gt;<br>)<br>order by table1.routefrom<br>&lt;/cfquery&gt;<br><br>in table1.sties field, data is like &quot;bla,bla,bla,bla&quot;<br>there is no erro. but no any result pulled out.<br>there should be some results.
 
The problem might be that when transferring the list to the loop, you shoud transfer it's value. Enclose it in pounds (#)<br>Like:<br>&lt;cfloop index=&quot;site&quot; list=&quot;#table1.sites#&quot; delimiters=&quot;,&quot;&gt;<br>instead of<br>&lt;cfloop index=&quot;site&quot; list=&quot;table1.sites&quot; delimiters=&quot;,&quot;&gt;<br><br>And another thing:<br><br>If that's your code try using 'route.table1.sites' when transferring the list&nbsp;&nbsp;to the loop
 
0=1 will never be true because 0 never equals 1<br>also you cannot have a loop inside a query that loops through the query results, because there are no reults as the query has not yet been performed.<br><br> <p>Russ Michaels<br><a href=mailto:russ@satachi.com>russ@satachi.com</a><br><a href= Internet Development</a><br>For my personal book recommendations visit <br>
 
0=1 has no problem. cause i used &quot;or&quot;.<br>I know something wrong with list=&quot;table1.sites&quot; <br>but it's not value transfered from previous page. it's data fieldname. I only two values #routefrom# and #routeto#.<br>i used loop cause datafield &quot;sites&quot;'s data is like &quot;site1,site2,site3,site4,....&quot; <br>i need to use delimiters to seperate them.<br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top