close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

multiple results on 1 page

Thread began 2/04/2010 12:13 pm by mr hankey | Last modified 2/05/2010 3:51 pm by mr hankey | 2161 views | 8 replies |

mr hankey

multiple results on 1 page

hi,

i have my clients detail page which shows the basic details, on that same page i want to show my repeat region/product_results page on the same page. i have generated my results page for the product but want to have on same page as their details an "add new product" button which will take my my insert_products page and auto assign it to that particular client and on same details page show the products results for that product to that client.

could anyone at all help point me in right direction here?

many thanks

Sign in to reply to this post

mr hankey

hi wa support,

i know you guys are extremely busy however could anyone help me with this one at all as i am really pushed on this for time now.

a breakdown of steps and what i need to do to get this working i would really really appreciate.

thanks again for your help

Sign in to reply to this post

Jason ByrnesWebAssist

your client results recordset is probably filtered by a session variable, right?


create a new recordset for products, your products table should have a column that relates to the client, set that column to filter on the same session variable that the client recordset is using.

use that session variable in the insert record sever behavior when inserting a product.

Sign in to reply to this post

mr hankey

jason,

can you be a bit more specific with your help here, if i was an expert at dreamweaver i would be able to do this however i feel the repsonses are one line answers. i know in my head what to do is i am sure most other do also on here but it is guiding us through that i am looking for.

i created mysql database which has foreign key from clients to products, i am able to add the clients details and it assigns from the session variable created from login to show it as that users client.

on my clients_details page i have a recodset showing the product/policy details if there is any. if not there is an add button, i click the add button and i have a form which shows on the same page this is still clients_details page, i added a form and added the data assist server behaviour to it. it allows you to insert no problem, but does not assign it to that client who is assigned to a user.

if i try binding from my clients details recordset to to a hidden filed from my product form which is call "product_clientid" it come back saying "Duplicate entry '' for key 1", if i take this out i can insert but will not assign it to the client.

can you please walk me through this, i appreciate you guys are busy, however listing the steps which most of us know need to happen but without clear guidance is no use.

i appreciate if you can get back to me.

thanks

Sign in to reply to this post

mr hankey

hi jason,

when i take out the data assist insert record server behaviour and add in the insert record behaviour built into dreamweaver it works fine, add the details no problem, only issue i have now is only showing that recordset for that client and not them all in each others, can you help with that and why do you think dataassist was not working when dreamweaver insert record does?

thanks

Sign in to reply to this post

Jason ByrnesWebAssist

It is impossible for me to give the level of guidance you are asking for with the level of detail you are providing.

You are providing a high level overview of your database structure, with this information, I can only provide a high level overview of the steps you need to preform.


If there is a specific step you are falling down on, I can help you with that, when you ask instructions on how to accomplish a task, I can really only give guidance on how to accomplish it, not the step by step instructions you are seeking.




from the error you provided:
"Duplicate entry '' for key 1"



it sounds like the product_clientid column in your table was created to not allow duplicates. If I am reading correctly, this column is in the Products table and is the foreign key relation to the clients.clientID column. make sure the that product_clientid column can accept duplicate values.


The key information you need here is this:
1) The clientID is stored in a session when they login.

2) To return records for that client, create your recordsets to filter the product_clientid column on that session variable.

3) To create records that relate to that client, store that session variable in the product_clientid column.

If you need specifics on how to create a recordset that filters on the client ID session variable, look at the recordset created by security Assist on the profile page.


If you need any other specifics, please feel free to ask

Sign in to reply to this post

mr hankey

hi jason,

thanks for that, i understand what you mean about giving a database overview. however as you can appreciate i have clients and i dont want to be posting every file up onto a public site where people could then see it.

the issue i am having is that i can add a client is a user, my site is this:

users login, users can add a client, once the client has been added the user can add products to this client.

what i have done so far is :

create the login page, insert_client page, clients reults page, clients details page, clients delete page.

when i login as myself and add a client and view the clients details page. i want to be able to have the clients results page to only allow the user who has logged the client see his.

in the clients details page i can see the clients details and on that page is where i have added the form to insert to the products table. i created a recordset on the page for the products table and i can insert into it. in the mysql database i can see the clients details and the userid properly given from the user who logged it.

aswel as this when i look in the product table i can see the client id for the appropriate client so it is working in the database correctly.

in my app though if i view the client details of client1 i can see in the products recordset repeat table the product details that were added for client 2.

only problem is i thought i binded the session variable correctly for username to userid. however all clients even if i never added them show my username assigned to but in database show the correct user id of 1 or 2.

i need your help to correct the userid to username issue, aswell as the issue of adding a product to client and it only showing in the repeat table of products only to that client not every clients products in every clients details.

if you can guide me through this i would appreciate it. i have tried adding recordsets, binding session variables that were created called clients_clientid to it but still not working. can i send you my files in any other way than posting everything here if you need it?

if you can guide me through an example even of what i am trying and i can substitute it to my situation.

basically all products will be added within the clients details page as i will have tabs on that page that will have "prooduct1", "product2" etc.

anything you can do. i added the dreamweaver insert record instead of the data assist one as it allowed me to insert into the product table with no problems.

many thanks

Sign in to reply to this post

Jason ByrnesWebAssist

I have created a support ticket so we can look into this issue further.

To view and edit your support ticket, please log into your support history:
login.php

Sign in to reply to this post

mr hankey

thanks jason

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