This content has been marked as final. Show 8 replies
Just an update ... it seems that one of my problems at least is that in the insert form, the supplemental field is not a simple field or checkbox but rather, a multiselect list. This is so because the chosen location can have one two or three services selected as well. So the link table might not understand the multiselect list?
Hi Mr. Dave
you can have a full help by reading this tutorial which is talking about:
:: Building Membership system ::
I hope this help...
Developer-Online Creator and programmer
Thanks but this really is not the same as my problem. I am using 4 tables and a many-to-many relationship. I have not problem with implementing a structure such as suggested in the tutorial. It seems there is no way to upload images to this forum, otherwise I cluld show examples of my structure ... and my problem.
I´ve been racking my brain over your pretty complicated issue -- so far to no avail, lol :-)
It seems there is no way to upload images to this forum
no, but you could post links to images on your server.
question: are you storing e.g. the associated "locations" and "services" as comma-separated values in e.g. additional columns in your users table ?
Adobe Community Expert, Dreamweaver
It would be best to post the images (I have them on my server). This would make it much easier to explain. Are links created using standard markup or is there something different on this forum?
OK .. I am hoping these images work as there is also no way to preview the post.
This is the dB diagram. Please note that I am using now, a modified version of this where everything except for the linking table and the airports and services table is combined into the users table.
this is the insert form:
I will post explanations of these in a minute.
OK .. with reference to the diagrams and images in the previous message. My issue is that I am having trouble inserting the proper id numbers into the usersairportservices table. This is because I cannot get my head around the fact that for every airport the user has access to, he might also have access to 1, 2 or all 3 services for that airport. So, while we are entering in only one user, that usr_id might have to get entered into the userairportservices table three time with the associated airport and services id, all in one insertion. Maybe this cannot be done like this or maybe, I have to add another many-to-many relationship between the services table and the airports table rather than combining them into one many-to-many relationship.
I am pretty confused about it all so any help is most definitely appreciated. And none of the tutorials really seem to apply to this situation.
OK .. since no one has responded ... I am hoping it was because I was not rational or clear with my last posts.
Usnging psuedo-code, this is the insert I am trying to achieve with ADTK:
$user_id = insert user
foreach airport checked
foreach(servicechecked for airport)
$user_id - from above
$service_id - checkbox
$airportid - airport from the loop
I have tried this using the many-to-many feature, choosing users table as the main table, the airports table as the details table and the services_id (also tried the services_id_services from the linking table) as the supplemental field. See the diagrams and example of form from my previous post (Nov 11).
Again .. I would appreciate any help I can get with this.