sounds like you'd need something like this: SELECT ... FROM table WHERE itemID IN (#idList#) AND type = 'food' [idList is a comma-delimited list of item IDs]
Assuming your list (sugar, milk, tv, flour) is actually a list of IDs the above query will return information on the rows you desire. I also assume you have a column (type) that can be used to differentiate the items. +-----------------------------------------------+ Bryan Love Macromedia Certified Professional Internet Application Developer Database Analyst TeleCommunication Systems [EMAIL PROTECTED] +-----------------------------------------------+ "...'If there must be trouble, let it be in my day, that my child may have peace'..." - Thomas Paine, The American Crisis "Let's Roll" - Todd Beamer, Flight 93 -----Original Message----- From: Janine Jakim [mailto:[EMAIL PROTECTED]] Sent: Thursday, September 19, 2002 9:55 AM To: CF-Talk Subject: Run a check before an insert Ok I need to make a check on one table before I do an insert into another table. (Kind of similar to a login where the 1st query checks the username/2nd query checks the group). But I want to be able to have the 1st table be able to check for several rows in the first query and only insert the matches into the second query. So an example is: I am restricted to only ordering food items. I order sugar, milk, a tv and flour. I want the first query to look at the order then send to the 2nd query the order for sugar, milk and sugar, leaving out the tv. (and maybe sending a message to the user...sorry you can't order that...) I can't seem to get my loops right on this one- I either seem to be able to add all or nothing. Thanks in advance, Janine ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists