close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Joining tables in Update page for Databridge

Thread began 8/29/2012 9:15 am by Patrice | Last modified 9/11/2012 5:19 pm by Patrice | 1078 views | 24 replies |

Patrice

Joining tables in Update page for Databridge

I'm starting a new project and trying to think through how to get it done properly.

Scenario:
Client has several employees who perform timed tasks, ie, at 8 am, they sign into work, by 9 am a set of tasks need to be completed, etc.

I know at some point I'll need to revisit Security Assist for individual employee login, but I'm not that far along in my work yet. I used SA a few years ago for a membership site, so I'll need to dust off my notes to learn how to do it again.

So at this stage, I have created these tables:

Projects (project_ID, project_name)
Tasks (task_ID, task_name, task_starttime, project_ID, employee_ID, task_competion -using a timedate stamp)
Employees (employee_ID, employee_name, employee_email, employee_password)

So, the employer will create the Project, assign tasks to that project, and an employee.

What I need then, is an employee Update page that will present fields so a particular employee can check a box when a task is completed. So that Update page will need to join all three tables together. I know how to create the page that presents three tables for the employer, but not yet sure how to make the update page for the employee. Can more than one table be used in an Update page? Any tutorials for doing this?

Thanks to anyone who has time to read and respond.

Sign in to reply to this post

Patrice

I just found this:
data_bridge_manage_relational_table.php
It might be what I'm trying to understand.

Sign in to reply to this post

Patrice

Well, if I could get by step 4 of getting the sql onto my server....

phpMyAdmin isn't letting me import for some reason. Maybe step 3 Open your Mysql database manager means something other than phpMyAdmin.

Sign in to reply to this post

Jason ByrnesWebAssist

try opening the SQL file in a text editor, copy all the SQL, then in PHPMyadmin go to the SQL tab, and past the SQL to run it.

you may need to create the blue_sky_music data base manually and make sure it is selected, and remove this from the SQL:

CREATE DATABASE IF NOT EXISTS blue_sky_music;
USE blue_sky_music;

Sign in to reply to this post

Patrice

Thank you! That worked. Thanks Jason.

Sign in to reply to this post

Patrice

Working my way thru that tut. Found a typo that is important for making it work.

I printed it out so using that, the error is on page 5 of 20.

Top section of page, step 5: Enter rsGeneres as the name of the recordset.... which is fine except lower on the page, it calls for rsGenres --- so the name of the record set isn't going to match your instruction of hand coding php echo row etc..

I discovered this because I used the bindings to pull in the echo instead of trying to type it in...

HTH someone.

Sign in to reply to this post

Patrice

Originally Said By: Patrice
  I'm starting a new project and trying to think through how to get it done properly.

Scenario:
Client has several employees who perform timed tasks, ie, at 8 am, they sign into work, by 9 am a set of tasks need to be completed, etc.

I know at some point I'll need to revisit Security Assist for individual employee login, but I'm not that far along in my work yet. I used SA a few years ago for a membership site, so I'll need to dust off my notes to learn how to do it again.

So at this stage, I have created these tables:

Projects (project_ID, project_name)
Tasks (task_ID, task_name, task_starttime, project_ID, employee_ID, task_competion -using a timedate stamp)
Employees (employee_ID, employee_name, employee_email, employee_password)

So, the employer will create the Project, assign tasks to that project, and an employee.

What I need then, is an employee Update page that will present fields so a particular employee can check a box when a task is completed. So that Update page will need to join all three tables together. I know how to create the page that presents three tables for the employer, but not yet sure how to make the update page for the employee. Can more than one table be used in an Update page? Any tutorials for doing this?

Thanks to anyone who has time to read and respond.  



Am I missing a joining table in my concept? While the tut is fine, I've not worked all the way thru and am getting frustrated. I want to jump into my own situation and see what I can do.

Sign in to reply to this post

Jason ByrnesWebAssist

In your concept, the Tasks table is the linking table:

Tasks (task_ID, task_name, task_starttime, project_ID, employee_ID, task_competion -using a timedate stamp)


The project_ID columns creates a many to many relation for the main table Projects.project_ID column

and the employee_ID column creates a many to many relation for the option table Employees.employee_ID



NOTE: While it is entirely up to you, It's a good idea to use a naming convention for your columns that prevents duplicate names. also, using underscores in the column names can cause issues in Dreamweaver, I prefer and recommend to use the camelCase naming convention instead.

The naming convention i like to use is to include the table name as a prefix to the column names. you are pretty much already doing this, with the exception of the foreign key columns in the tasks table. For example, the naming convention I would use for your tables is;

projects (projectID, projectName)
tasks (taskID, taskName, taskStarttime, taskProjectID, taskEmployeeID, taskCompletion)
employees (employeeID, employeeName, employeeEmail, employeePassword)

by using taskProjectID and taskEmployeeID as the name in the tasks table, there is no way to confuse them with the projects.projectID or employees.employeeID primary key columns. this can helpful when working with a big recordset that joins many tables together.

Sign in to reply to this post

Patrice

Thank you Jason! I really appreciate the advice. I didn't know about underscores and DW. And I thought the foreign keys in a table had to match the originals. No wonder some databases have been confusing me!

Really appreciate the help.

Sign in to reply to this post

Patrice

Update and puzzled.
Again, thank you Jason for all the advice.

I've recreated the 3 tables with the naming system you advised. I've entered some data so I can test further.

But I'm stuck again.

The way I have it up to this date, the employer would have to go in and create a set of tasks for each day of the year before the employee could check off that it was completed on time or not.

I added a projectDate field so that a task can be assigned to a date. But that doesn't solve labor intensive issue of employer adding 5 tasks each day to 5 employees. That will never work.

Any guidance most appreciated.

Sign in to reply to this post
loading

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