Ok let me see if i can explain this right. I have a table called Items.
It has Item_ID, Item_Name. Basically a lookup table.
I have another table for basic info entered on a form say its called
SI_Report
Now when someone comes to the form its populated with a few fields
that will be entered into the SI_Report like name, time, date etc. Then all
the items (33 of them right now but that will changed per customer they
define
them, themselves) are laid out on the form as check boxes.  When they fill
out the form they CHECK which ever items apply. So they may check ONE
they may check 10. Here is where i get confused.  Each item is laid out
as such

<input type="checkbox" name="?" value="1">Item Name
These are all built on the fly from the item table.  So first I can't NAME
THEM ALL
Item_ID because then the last one checked over rides all the others.
So I named them name="Item_ID#Item_ID#" so they would be unique like
ITEM_ID1 ITEM_ID2 ITEM_ID3. Maybe this isnt the way. So there is a third
table that takes the REPORT ID from SI_Report and the ITEM_ID from Items and
puts them in SI_Items So say the report number is 3 and items 7, 10 and 20
were
chosen there would be 3 entries in SI_Items
3 7
3 10
3 20
No problem. The problem is that in order to insert these variables into
SI_ITEMS I have
to do a check 33 times to see if the item_id exists. Example <CFIF
ParameterExists(ItemID1)>
insert it into the table. And so on.  First there MUST be another way to do
this
without having to run it 33 times. Or at least to prevent me from typing it
33 times. Like
I tried running a record count on the items table to see how many items and
then tried
to run the query upping the number each time for the amount of items i
found. But still
that seems like a bad way to do it.  I am really new to anything beyond
basic querying so
there is probably an easy way maybe I am just missing.  Any suggestions?? If
i havent
been clear or you have questions let me know.
Kelly

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to