Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to Add PK As Foreign Key To Existing Table

Author  Topic 

Palermo
Starting Member

25 Posts

Posted - 2013-12-27 : 10:54:02
I have created two tables in phpMyAdmin 3.5.8.1. comments which stores comments users post on a website and registration which stores a users registration details (username, password, e-mail etc, etc).

I want to add the username field from the registration table as a foreign key to the comments table. How do I do this in phpMyAdmin?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-12-27 : 12:37:27
You'll want to post your question on a site that specializes in php. SQLTeam is for Microsoft SQL Server.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

Palermo
Starting Member

25 Posts

Posted - 2013-12-27 : 13:11:49
SQL queries are run from within the phpmyadmin console.
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2013-12-27 : 13:27:54
We can only help you with T-SQL, not with php SQL.

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -