close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Create a results table which brings in cross reference data from other tables

Thread began 3/02/2010 2:28 am by neil.batchelor254136 | Last modified 3/18/2010 12:50 pm by neil.batchelor254136 | 1882 views | 5 replies |

neil.batchelor254136

Create a results table which brings in cross reference data from other tables

I have tables of data that I ask users to fill in.

1. User Data
2. Venue Data
3. Resturant Data
4. Meeting Rooms Data and more

When the user creates an account they get a USER ID PRIMARY KEY.

The Session ID = USER ID of the logged in user is populated in each of the tables 2 3 and 4.
This helps me keep track of who has updated and added data into tables 2 3 and 4.
So each table 2 3 4 have a USER_ID column or similar that is populated with the USER_ID from the User Data table = Session ID.

However I would like to create results table that tells me which users have which records.


Venue Data Rest. Data Meeting Rooms
User 1 Yes id 1 No Yes, 7 records in total, id 1
User 2 No Yes 2 records in total, id 2 Yes 1 records in total, id 2

I appreciate this is complex and I have very little idea how to do this, but it is crucial to my business that I build this as soon as I can with Data Assist.

Many thanks,
Neil

Sign in to reply to this post

neil.batchelor254136

[QUOTE=neil.batchelor254136;46721]I have tables of data that I ask users to fill in.

1. User Data
2. Venue Data
3. Resturant Data
4. Meeting Rooms Data and more

When the user creates an account they get a USER ID PRIMARY KEY.

The Session ID = USER ID of the logged in user is populated in each of the tables 2 3 and 4.
This helps me keep track of who has updated and added data into tables 2 3 and 4.
So each table 2 3 4 have a USER_ID column or similar that is populated with the USER_ID from the User Data table = Session ID.

However I would like to create results table that tells me which users have which records.


Example of ideal results table attached in zip
If any of the columns display 'Yes' then a count of the number of records for that user in that table, then I would like to be able to click through and see another results table showing that number of records for that table for that user.

I appreciate this is complex and I have very little idea how to do this, but it is crucial to my business that I build this as soon as I can with Data Assist.

Many thanks,
Neil

Attached Files
result table to create.zip
Sign in to reply to this post

Jason ByrnesWebAssist

really what you are asking is a very broad question. there are a few key concepts you will need to grasp to be abel to create something like this
1) Master detail page set.
a good example of this is the results and detail page created by data assist.

The idea is to have a master Page that lists all of the posible records. Lets use Users as an example, the master would show all of the users. The link to the detail page will pass the User_ID valu as a querystring. This querystring value is used to filter the recordset to return only the one record where the USER_ID column is equal to the querystring that was passed.

2) Joined Queries.
A joined query is a query that returns related information from two or more tables.for you situation, the join query will look like:
SELECT User.* Venue.* Restaurant.* Meeting.*
FROM User
INNER JOIN Venue ON User.User_ID = Venue.User_ID
INNER JOIN Restaurant ON User.User_ID = Restaurant.User_ID
INNER JOIN Meeting ON User.User_ID = Meeting.User_ID



you can modify this to return a specific users Data by adding a where clause:
WHERE Users.User_ID = $_GET['User_ID']


3) SQL math commands
To return a count of records where a column is equal to yes require using a where clause and the count command on the ID column:
SELCT COUNT(id) as recCount From tabelName WHERE colName = 'yes'

you can take the SQL example I gave above and modify it to add the count and the where clause.


If there are specific steps you are struggling on, please let us know.

Sign in to reply to this post

neil.batchelor254136

Create a results table which brings in cross reference data from other tables

Jason,

I think I would struggle with steps 2 and 3. However I appreciate your advice is there something I could read that would help me.

Perhaps we could run through one example with my file and DB structure structure can I email this to you, or would you email me please at neil.batchelor@btinternet.com to discuss this further. (its a 3.9mb zip file)

Many thanks,
Neil

Sign in to reply to this post

Jason ByrnesWebAssist

more on joined queries can be found here:
sql_join.asp


and you can learn about the count function here:
sql_func_count.asp

Sign in to reply to this post

neil.batchelor254136

joins

Thanks Jason I have started reading this and it seems to all make sense I will try and implement something on the weekend.

It would be great to see these features in dataAssist as standard, cross referencing (orders and users for example), joining tables, bespoke table views with drag and drop, making using images and uploading images and displaying images from mysql tables easier.

Thanks,
Neil

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