ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 12th, 2005, 07:45 AM
andy11983 andy11983 is offline
Newbie wannabe extrodanaire
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: stoke
Posts: 310 andy11983 User rank is Corporal (100 - 500 Reputation Level)andy11983 User rank is Corporal (100 - 500 Reputation Level)andy11983 User rank is Corporal (100 - 500 Reputation Level)andy11983 User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 2 Days 8 h 25 m 2 sec
Reputation Power: 6
list

Hi i have a list that i have created which is
Code:
SELECT td.status as tdStatus,tu.Status as tustatus,ild.trackingID as dTrackingID,ilu.trackingID as uTrackingID,item.site, item.name, item.width, item.height, item.option1, item.option2, item.option3, item.option4,
ilD.filename AS Dfilename,td.status AS Dstatus, ild.file_size as iDFileSize,ilU.filename AS Ufilename, tu.status as uStatus, ilu.file_size as iuFileSize

FROM itemFlash item
inner join pageHasFlash ph on ph.itemID = item.id 
INNER JOIN itemPage p ON ph.pageID = p.id 
INNER JOIN templateFlash tmp ON p.templateID = tmp.templateID 
INNER JOIN itemFlashLanguage iLd ON item.id = ild.itemID
inner join tracking td on ild.trackingID=td.id
left outer join itemFlashLanguage ilu on item.id = ilu.itemID
left outer join tracking tu on ilu.trackingID=tu.id and iLu.languageID = <cfqueryparam value="#iUserLanguage#" cfsqltype="CF_SQL_INTEGER">   and tu.status = <cfqueryparam value="translated">
WHERE (td.status in (<cfqueryparam value="#liVisibleStates#" cfsqltype="cf_sql_varchar">))
AND (p.id = <cfqueryparam value="#pageID#" cfsqltype="CF_SQL_INTEGER">) 
AND (ph.itemNumber =<cfqueryparam value="#attribID#" cfsqltype="CF_SQL_INTEGER">) 
AND (tmp.itemNumber =<cfqueryparam value="#attribID#" cfsqltype="CF_SQL_INTEGER">)


but for some reason it doesnt work in my query when i call the variable liVisableStates.

I think it is something to do with the fact that there are no '' seperating the states - but the query works when i put the states in manually into the query.

Code:
SELECT td.status as tdStatus,tu.Status as tustatus,ild.trackingID as dTrackingID,ilu.trackingID as uTrackingID,item.site, item.name, item.width, item.height, item.option1, item.option2, item.option3, item.option4,
ilD.filename AS Dfilename,td.status AS Dstatus, ild.file_size as iDFileSize,ilU.filename AS Ufilename, tu.status as uStatus, ilu.file_size as iuFileSize
		
FROM itemFlash item
inner join pageHasFlash ph on ph.itemID = item.id 
INNER JOIN itemPage p ON ph.pageID = p.id 
INNER JOIN templateFlash tmp ON p.templateID = tmp.templateID 
INNER JOIN itemFlashLanguage iLd ON item.id = ild.itemID
inner join tracking td on ild.trackingID=td.id
left outer join itemFlashLanguage ilu on item.id = ilu.itemID
left outer join tracking tu on ilu.trackingID=tu.id and iLu.languageID = 120  and tu.status = 'translated'
		
WHERE td.status in ('built','published','publishedsoon','approved','submitted','rejected')AND (p.id = <cfqueryparam value="#pageID#" cfsqltype="CF_SQL_INTEGER">) 
AND (ph.itemNumber = <cfqueryparam value="#attribID#" cfsqltype="CF_SQL_INTEGER">) 
AND (tmp.itemNumber = <cfqueryparam value="#attribID#" cfsqltype="CF_SQL_INTEGER">)


I was wondering if someone can shed a light on it

Thanks for your help

Andy

Reply With Quote
  #2  
Old August 12th, 2005, 07:48 AM
kiteless kiteless is offline
Moderator
Dev Shed Expert (3500 - 3999 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 3,648 kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level)kiteless User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 4 Days 12 h 8 m 8 sec
Reputation Power: 53
You could try using listQualify() within the cfqueryparam.
__________________
Ask if you have a question, but also help answer questions that you have knowledge of! Thanks, Brian.
How to Post a Question in the Forums

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > list


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway