View Full Version : Relationships

11-02-2006, 05:53 PM
Okay i'm alittle new to phpmyadmin / mysql. But in acces and MSSQL there is a way to create relationships between tables. I tried innerjoins but it's not what i needed. Can someone please explain how to create relationships between tables in phpmyadmin/mysql.


11-02-2006, 08:17 PM
mysql works diferently to Access

your joins (relationships) are created when the SQL executes. Its not like access where you save them as a query and you have a visual representation

syntax like so...

SELECT TABLE LEFT JOIN TABLE2 ON TABLE2.data_id = TABLE.data_id WHERE.....[condition]

when this runs you will get the results back as if TABLE and TABLE2 are linked by data_id field