Skip to main content
Known Participant
March 28, 2007
Question

how to make relation between 2 tables in phpmyadmin

  • March 28, 2007
  • 3 replies
  • 1791 views
hi
i have 2 tables in mysql database and i want to make relation between the two tables
how to do that in phpmyadmin or any visual tool?

thanks in advance.
This topic has been closed for replies.

3 replies

Inspiring
April 1, 2007
quote:

Originally posted by: macnux
hi
i have 2 tables in mysql database and i want to make relation between the two tables
how to do that in phpmyadmin or any visual tool?

thanks in advance.



Download Navicat MySQL it has a visual query builder and can do alot more.
Get a copy of HeidiSQL also a useful GUI tool.

Cheers


Inspiring
March 28, 2007
MySQL is different from access, in that you have to create the SQL to join
the tables yourself.

In Microsoft Access, you could drag a join from one table to another.
Although this is a visual process, all its doing is creating SQL behind the
scenes to join the tables.

With MySQL you don't have a visual editor, you have to manually create the
SQL yourself, and theres load of tutorials on the net which will help you
with this.

--
Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.


Günter_Schenk
Inspiring
March 28, 2007
Hi,

>>
...how to do that in phpmyadmin
>>

even if you could create table relations in PhpMyAdmin (I can´t, but that might depend on the version), I´d rather suggest doing this by using a "JOIN" within your query -- here´s a short tutorial.

>>
...or any visual tool
>>

there is at least one commercial DW extension available that´s providing a sort of "visual query maker" tool including creating such JOINs