close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Database population

Thread began 11/24/2011 5:39 am by Dave W | Last modified 11/27/2011 3:21 am by Ian S | 2162 views | 5 replies |

Dave W

Database population

Hello,
I am using a category list and a subcategory list to populate the menus, this works fine, but when it submits to the database it enters the category_id and the subcategory_id into the relative database fields.
I want it to enter the values i.e. category = TV, subcategory = United Kingdom instead of the ID's. Can this be done?

I have found an answer to this problem in the forum at showthread.php?t=14673 But I need some clarification on the answer.
1. I take it that I populate the two dropdowns as normal
2. I add another recordset for EACH dropdown filtering the id column with a form variable using the name of each dropdown list.
3. Now comes the part I don't understand. How do I update the insert server behaviour to accept these new columns?
I have used the dropdown under the insert record behaviour and can't find any reference to the form variables I set up in the two new recordsets.

Any help will be gratefully accepted.

Sign in to reply to this post

iansheldon422428

I've just done something similar recently and the way I managed to get around it was to create a two stage insert / update process.

Page One (say form.php for example)
The user sees the form as normal and the information. The form is then set to post to the next form which is where out insert behaviour sits. We will call this page process form.php

Page Two (process form.php)
First we insert a standard dreamweaver recordset that pulls back the category record filtered by the POST value of the drop down list in the form.

We then run the WA Data Assist Insert behaviour that populates the database entries. Some entries will pick up their POST values from the form, where as the category field will pick up its value (say category name) from the recordset that was filtered by the forms POST variable.

Does that make sense? There may be a more efficient way to do it but this works for me.

Cheers
Ian

Sign in to reply to this post

Dave W

Thanks Ian,
Yes it does make sense, but it's a bit of a long way round. The form is quite long anyway and to add another step might put prospective clients off.
I was hoping that Eric from Technical Support (or someone similar) might reply as he offered the original solution, which appeared to work from Kelly's reply.
I just can't figure out how to substitute the insert behaviour fields with the ones from the new recordset.
But if I get no replies from Tech support ( hope they do as Iv'e spent a lot of money with them) will try yours.
Thanks again for your help

Sign in to reply to this post

Ian S

No worries Dave.

Just to add though, my solution doesn't add any extra steps or pages for the site visitors at all.

It simply passes the form variables to a 'processing page', which the client does not see.

I actually think it's quite a tidy solution tbh!

Cheers
Ian

Sign in to reply to this post

Dave W

Hi Ian,

Yes , see what you mean now. Didn't read it properly :-)

I found the solution now anyway. Just in case you need it it's below.

Firstly you need Data Assist installed (I was using a standard Dreamweaver Insert hence couldn't see how to make the changes to the insert behaviour)

Follow steps 1 & 2 in my first post, when it comes to the inset use Data Assist Insert and in the drop down box at the bottom select (in my case) Categories from the new recordset you made for categories, and the same for subcategories.

Virtually the same thing that you are doing without using another (invisible) page.

Thanks for you help and I think this would probably have worked for your problem as well.

Cheers,
Dave

Sign in to reply to this post

Ian S

Hi Dave,

No worries :-)

Glad to hear that you found the solution you were looking for.

Cheers
Ian

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...