How does relations work in mysql?
Isn't to get data from 2 different tables in one quary?
What is the syntax. Don't find it in php manual.
Relations(I think)
Moderator: General Moderators
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Try the MySQL manual:
http://www.mysql.com/doc/en/SELECT.html
There's an example of a query pulling data from two tables on that page.
Mac
http://www.mysql.com/doc/en/SELECT.html
There's an example of a query pulling data from two tables on that page.
Code: Select all
mysql> SELECT t1.name, t2.salary FROM employee AS t1, info AS t2
-> WHERE t1.name = t2.name;
mysql> SELECT t1.name, t2.salary FROM employee t1, info t2
-> WHERE t1.name = t2.name;