Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.
Moderator: General Moderators
phppick
Forum Commoner
Posts: 57 Joined: Thu Aug 14, 2003 5:59 am
Post
by phppick » Sun Aug 17, 2003 10:14 am
Can anybody tell me how write a Query connecting 2 Database tables.
Suppose Database "A" Got table1 and Database "B" got table2. i wnat to get some data by joining these 2 tables.
A.table1 and B.table2
patrikG
DevNet Master
Posts: 4235 Joined: Thu Aug 15, 2002 5:53 am
Location: Sussex, UK
Post
by patrikG » Sun Aug 17, 2003 10:27 am
There's a nice tutorial about this
here .
nigma
DevNet Resident
Posts: 1094 Joined: Sat Jan 25, 2003 1:49 am
Post
by nigma » Sun Aug 17, 2003 12:00 pm
Thanks for the link patrik, I have wondered that myself but didn't know what it was called so searching didn't help me.
derek
Forum Newbie
Posts: 17 Joined: Sat Aug 16, 2003 11:31 am
Post
by derek » Mon Aug 18, 2003 1:02 am
SELECT table1.name, table2.grade FROM table1,table2 WHERE table2.marks < 60 AND table1.age = 20 ORDER BY DESC LIMIT 0,1;