List:General Discussion« Previous MessageNext Message »
From:Matthew Stuart Date:April 28 2008 12:15pm
Subject:Query problem
View as plain text  
I am trying to display results from one or the other part of the  
query, however, at the moment it is showing results from both parts.  
The Replace part of the query works fine in that it chooses the  
correct data to display, but the content relevant to /8/ always  
displays even when I select, say, /13/ or /22/. I need to hide  
results for /8/ until it is selected.

rsChannelArticles.Source = "SELECT * FROM bunker01db1.tbl_allarticles  
WHERE (fld_category LIKE '%/" + Replace(rsChannelArticles__channel,  
"'", "''") + "/%' AND fld_show = 1 AND fld_reldate <=NOW()) OR  
(fld_category LIKE '%/8/%' AND fld_reldate >=NOW()) ORDER BY  
fld_reldate DESC"

The reason for this is that the webpage displays content when a  
release date/time (or embargo) has passed, however, the section /8/  
needs content to disappear once that date/time has passed.

Any ideas?

Thanks
Thread
Query problemMatthew Stuart28 Apr 2008