Posted 26 February 2003 - 11:37 AM
can anyone tell me?
Posted 26 February 2003 - 04:38 PM
There is no way to create a relationship between tables in MySQL. The relationships must be upheld through the code.
I believe they are planning to fix this as of MySQL 4
Posted 26 February 2003 - 05:04 PM
Posted 26 February 2003 - 05:07 PM
I myself am a bit unsure of how to do this... would you mind pointing me in the right direction?
do you know how to join the tables in a query?
Posted 26 February 2003 - 07:02 PM
Posted 26 February 2003 - 07:10 PM
id | name
1 | charlotte
2 | new york
id | name | city
1 | bob | 1
2 | bill | 2
select p.name, c.name from cities c , people p where p.city=c.id;
(this is off my head - i may have something wrong but i hope you catch the general idea)
bob | charlotte
bill | new york
it returns the person\'s name and the city\'s name where the city field was equal to the cities id.
Posted 21 November 2003 - 10:12 PM
Thank you Effigy for spelling it out for us converts!
Posted 21 November 2003 - 10:14 PM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users