> with one field (ShowOnPages) that has delimited text
values ( ie: 1,3,4,7,6 )
You have already have discovered one of the reasons against
storing delimited data: it is tough to query. You would be much
better off normalizing the data. Change your table to store a
single record for each pageID + bannerID combination. Then a simple
query is all you will need to return the banners that should show
up on the current page ID.
SELECT BannerID, OtherColumns...
WHERE PageID = <cfqueryparam value="#thePageID#"