"You're not making any sense." :o)
I totally agree! That's why I need help because my brain goes
so far with
this and then just implodes! For newbies like myself this
type of thing is
very complicated. It is only through the kind help you are
offering that I
will understand, and for that I am very grateful.
I was just thinking that, in order for the van drivers to
mark which
operating areas they want to view quotes for, they would have
to, somewhere,
mark this in the database, I had assumed by using an INSERT
form. On my
INSERT page I wanted something simple like this:
Choose Operating Areas:
All UK <checkbox>
All Scotland <checkbox>
All Wales <checkbox>
...etc (16 checkboxes).
If I create a seperate table for VanDriver areas, as Jules is
suggesting
(that has vandriverID and areaID), then how do I insert this
data into one
table, one record for each checkbox? It's almost like a
multiple INSERT?
Is that possible?
Hope to hear from you,
Regards
Nath.
"Lionstone" <HIDElionstone@HIDEhushmail.com> wrote in
message
news:eba8t8$a0u$1@forums.macromedia.com...
> You're not making any sense.
> Why do you have a table of operating areas, but then
list out operating
> areas across the van drivers operating areas table as
columns? And then
> your columns are foreign keys to boot. So does each
driver have his own
> definition of what "all England" means? That's what your
table structure
> is implying.
>
>
> "tradmusic.com" <sales@NOSHPAMtradmusic.com> wrote
in message
> news:eb9nu1$il9$1@forums.macromedia.com...
>> Hi Jules.
>> Thank you for contributing to this thread. I think I
need to explain
>> things more clearly. It is trying to combine these 5
tables that is
>> causing me a week long headache! Here are my tables:
>>
>> Orders:
>> OrderID (PK)
>> PickUpRegion (numeric - a foreign key to the
RegionID PK in the Regions
>> table)
>> DeliveryRegion (numeric - a foreign key to the
RegionID PK in the Regions
>> table)
>>
>> Regions:
>> RegionID (PK)
>> Region
>>
>> Operating Areas:
>> OpAreaID (PK)
>> OperatingArea
>>
>> Operating Area Regions:
>> OpAreaRegionsID (PK)
>> OpAreaID (FK)
>> RegionID (FK)
>>
>> Van Drivers Operating Areas (this table allows Van
Drivers to select
>> which operating areas they want to view orders from)
>> VanDriverOpAreasID
>> VanDriverID (FK)
>> ALLUK (numeric - a foreign key to the OpAreaID PK in
the Operating Areas
>> table)
>> ALLSCOTLAND (numeric - a foreign key to the OpAreaID
PK in the Operating
>> Areas table)
>> ALLWALES (numeric - a foreign key to the OpAreaID PK
in the Operating
>> Areas table)
>> NORTHSCOTLAND (numeric - a foreign key to the
OpAreaID PK in the
>> Operating Areas table)
>> SOUTHSCOTLAND (numeric - a foreign key to the
OpAreaID PK in the
>> Operating Areas table)
>> ...etc (there are 16 operating areas)
>>
>> In my Operating Area Regions link table, I have
associated the regions to
>> the operating areas. I just can't figure out the
SELECT statement I need
>> to use in order for Van Drivers to ONLY see orders
from their selected
>> Operating Areas.
>>
>> Really appreciate this and, as indicated in my
initial thread, I am happy
>> to pay for advice offered to help me solve this
problem. Thank you.
>>
>> Regards
>> Nath.
>>
>> "Julian Roberts" <nospam@charon.co.uk> wrote
in message
>> news:eb7uqb$c6o$1@forums.macromedia.com...
>>> It's not quite clear what your structure is. Is
allengland a field or a
>>> record in the tblVanDriverOperatingAreas table.
If it's a field, then
>>> your structure is wrong. I'd suggest:
>>>
>>> Orders:
>>> OrderID
>>> RegionID
>>>
>>> Regions:
>>> RegionID
>>> Region
>>>
>>> VanDrivers:
>>> VanDriverID
>>> VanDriver
>>>
>>> VanDriverRegions:
>>> VanDriverID
>>> RegionID
>>>
>>> Then to show orders for a van driver:
>>>
>>> select * from Orders
>>> where RegionID in (
>>> select RegionID from VanDriverRegions where
VanDriverID=10
>>> )
>>>
>>> --
>>> Jules
>>>
http://www.charon.co.uk/charoncart
>>> Charon Cart 3
>>> Shopping Cart Extension for Dreamweaver MX/MX
2004
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>