Page 1 of 1

need help please....

Posted: Mon Sep 22, 2008 1:19 pm
by Alidad
Perhaps someone can help me with an example I've come up with to help me to better understand how to build a relationship in Mysql.

I have database name “members” and two table name “registered” and “Screen”

Registered table:

First name
Last name
User name
Password

Screen table:

Title
Category
Date
Comments

What they do is that when member log in from registered table, then input information then send data to the Screen table.

Now I have two questions:

1) How would or SHOULD I go about creating the database relationship to show that the screen table is come from right user name!

2) How do I create insert statement into the Screen table that come from right user name!

Please help thanks.

AM

Re: need help please....

Posted: Mon Sep 22, 2008 1:45 pm
by onion2k
Assuming you have an id of some sort in the 'registered' table, sort the same id in the 'screen' table.

Re: need help please....

Posted: Mon Sep 22, 2008 1:57 pm
by califdon
You may find a basic tutorial on relational databases of value. Try:
http://www.geekgirls.com/databases_from_scratch_3.htm
http://parallel.vub.ac.be/documentation/database/tutor/

For your next forum post, please follow our forum rules and DO NOT use general Subjects, like "need help please". That tells us nothing about what area your problem may be in. As a result, many of the people who are best able to help you will simply skip over your post without reading, because we are looking for specific areas where we may be able to provide help.

Re: need help please....

Posted: Mon Sep 22, 2008 4:11 pm
by Alidad
thank you onion2k, I'm getting there to underand, how do i can write relationship statments between two tables!

AM