F
funky
Guest
Can someone help me with mySQL "primary keys"?
Say I have user "funky" who is in table "ab_users". How do I give im an id in a second table called "ab_urls", and link that to table "ab_users" ?
I get the basic idea of needing an id for the tables, but if someoe could give me a basic mySQL query to use to create the tables, I'd appreciate it. I do not want to create them manually in phpmyadmin, because I don't "get it" yet.
I need to "get it" before I implement it. Please help. Any pointers would be great!
Now an example:
user: funky ab_userid: 1
he has a ab_url_id: 5
has three urls in table ab_urls:
if someone pulled ab_url_id: 5
url_name:
http://mac-forums.com/forums/fakethread.php
url_option1:
yes
url_option2:
no
url_name:
http://apple.com/osx
url_option1:
yes
url_option2:
yes
url_name:
http://mac-forums.com/forums/fakethread.php
url_option1:
no
url_option2:
no
How do I implement this?
Thanks!
Say I have user "funky" who is in table "ab_users". How do I give im an id in a second table called "ab_urls", and link that to table "ab_users" ?
I get the basic idea of needing an id for the tables, but if someoe could give me a basic mySQL query to use to create the tables, I'd appreciate it. I do not want to create them manually in phpmyadmin, because I don't "get it" yet.
I need to "get it" before I implement it. Please help. Any pointers would be great!
Now an example:
user: funky ab_userid: 1
he has a ab_url_id: 5
has three urls in table ab_urls:
if someone pulled ab_url_id: 5
url_name:
http://mac-forums.com/forums/fakethread.php
url_option1:
yes
url_option2:
no
url_name:
http://apple.com/osx
url_option1:
yes
url_option2:
yes
url_name:
http://mac-forums.com/forums/fakethread.php
url_option1:
no
url_option2:
no
How do I implement this?
Thanks!