close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

DataAssist & Listing an Array

Thread began 2/27/2013 6:18 am by B Tonkin | Last modified 2/27/2013 6:42 am by Jason Byrnes | 639 views | 1 replies |

B Tonkin

DataAssist & Listing an Array

Hey WA,

I'm trying to use DataAssist to create a management system where a user can enter a result (a word in this circumstance) but be able to assign it to 1 or more categories (out of a possible 4, with scope to expand). DataAssist was able to set up most of this and get it almost there. Works fine with a single category selection but not with multiple selections.

It looks like it is storing the comma separated keys in the right column but I'm thinking the results page has issues with how it's to display multiple categories in the categories column. Also, once a user has applied multiple categories to an entry, it won't relist the same category selections on the update page.

I'm attaching the three working files that I have. It's very much out of the box, aside from the following addition to the top of the insert and update pages.

<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}
}
?>

Attached Files
Archive.zip
Sign in to reply to this post

Jason ByrnesWebAssist

you are going about this the wrong way.

  It looks like it is storing the comma separated keys in the right column  



you should not create a many to many relationship by storing a comma separated list of key in the main table, this is not a very good database structure.

instead, you should use a linking table. you can then use the manage relational table behavior to results to the categories.

see the "Managing Relational Tables in Data Bridge" tutorial on the Data Bridge support page for details:
data-bridge/

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