that worked perfectly! thank you so much!


-----Original Message-----
From: Rick Widmer [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 22, 2002 6:08 PM
To: Jonathan Narong; David Elliott; Jonathan Narong on PHP-DB
Subject: Re: [PHP-DB] RE: regarding multiple joins

At 05:26 PM 11/22/02 -0800, Jonathan Narong wrote:
>sorry for my confusing email... i'll try to clarify what i was asking:
>i have two tables (i shortened them to only show the parts relating to what
>i'm trying to do now) ...
>CREATE TABLE articles (
>   id smallint(4) unsigned zerofill NOT NULL auto_increment,
>   title varchar(40) NOT NULL default '',
>   public char(1) NOT NULL default 'y',
>   author smallint(6) default NULL,
>   editor smallint(6) default NULL,
>   photog1 smallint(6) default NULL,
>   photog2 smallint(6) default NULL,
>CREATE TABLE people (
>   id tinyint(3) unsigned NOT NULL auto_increment,
>   name varchar(30) NOT NULL default '',

Try this...

SELECT title, AS AuthorName, AS EditorName, AS Photog1Name, AS Photog2Name
FROM articles, people a, people b, people c people d
WHERE author = AND editor =
   AND photog1 = AND photog2 =
   AND what ever else you want in the where clause;


PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to