close ad
Databridge V2 with MySQLi support IS Now Available!
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Recordset Relation Manangement

Thread began 7/09/2011 4:12 am by Cologne | Last modified 7/11/2011 5:39 pm by Jason Byrnes | 1311 views | 5 replies |

Cologne

Recordset Relation Manangement

Hi,

how do I create the manage relation serverbehavior, if I onle got one recordsset?

I got a recordset for t-shirt size (S,L,M etc.)

From this record i create a checkboxlist.

now I want to store the t-shirt data, like name, price, etc in a new databasetable. and store the possible sizes in the relationshiptable.

so I got:

tShirt:
shirtID
shirtName
shirtPrice

size:
sizeID
sizeType

relationTshirtSize:
ID
shirtID
sizeID

The problem is, it is missing the tShirtID cause, the record isnt stored already.

should I use a session?

Cheers
Denis

Sign in to reply to this post

Lon WintersBeta Tester

I think you're going about it in reverse order. Start with the main tanker table,that contains a unique ID, name price and any other static info for each item. Then create the table for the sizes, also with a unique ID, and another table for colors, again with a unique ID.

At this point they are separate entities and aren't related until a use configures a particular T shirt.

On the selection page, list the available t shirts along with the selectors for size and color. I would use drop downs and populate from the database tables. The drop downs would display the size and color, but the value would contain the record ID. When submitted, insert into an ORDERS table that contains just the IDs for t shirt, size and color. The orders table will have it's own ID to serve as the order number.

If you also capturing user info, include the user ID. The relationship comes not play by the orders table and you can construct a query to display the data.

Sign in to reply to this post

Cologne

Hey Lon,

its more for my backend :-)

I ad a new tShirt and want some checkboxes to choose the possible size of the shirts.

there is one I only sell in S,M and L

another I sell in XS,S,M,L

so I think I need to use that WA relation tables.

The thing is, it is not an update table :-(

Sign in to reply to this post

Jason ByrnesWebAssist

in the data assist insert record behavior, there is a section named session that allows you to store the inserted records ID to a session variable,

use this session variable in the manage relational table behavior to associate the sizes to the shirt id.


see this post by Andrew Reed for a good walk through on using the Manage relational Table behavior:
showpost.php?p=84393&postcount=17

Sign in to reply to this post

Cologne

Hey Jason,

thanks for that great link! It works just fine :-)
But I get an red ! in my server behaviors list :-(

Is there something wrong?

Do you get it, too?

Cheers
Denis

Sign in to reply to this post

Jason ByrnesWebAssist

a red exclamation mark only means that there _may or may not_ be an issue.

if the page is working, you can ignore it.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...