You are here: Re: MySQL query on multiple tables ? « PHP Programming Language « IT news, forums, messages
Re: MySQL query on multiple tables ?

Posted by Geoff Berrow on 10/10/43 11:22

I noticed that Message-ID:
<1121580999.292072.189900@g14g2000cwa.googlegroups.com> from John
contained the following:

>I still keep the "id" in tables "contact" and "classes" and make these
>"id" fields primary keys in the tables they reside in. Would that solve
>the database structure problem ?

No.

Your data is not structured at the moment, it is simply split across
three tables.

I'm not an SQL expert but you could probably do

SELECT DISTINCT col1,col2,col3... FROM tbl1,tbl2,tbl3 WHERE
tbl1.id=tbl2.id AND tbl2.id=tbl3.id AND (bio109 ='A' OR history101='B')

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация