>  select id, lname, fname, pic from database where engagedto=id;

Sorry, mate, that won't work.  That will find folks who are engaged to
themselves, i.e., narcissists

-----Original Message-----
From: Oliver Heinisch [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 11:30 AM
To: [EMAIL PROTECTED]
Subject: Re: basic query question


At 19.02.2002  10:22, you wrote:
>I'm fairly new to MySQL, so if anyone could help me I'd really appreciate
>it!
>
>What I'm trying to do is join two pictures in a database to each other.  My
>database holds info about people with variables:
>
>id, lname, fname, engagedto, pic
Try this, even if I´m careful due to my bad day, see todays threads  ;-)

select id, lname, fname, pic from database where engagedto=id;


>The engagedto field contains the id of the person they are engaged to.  I'm
>trying to print the people that are engaged to each other next to each
>other.  I've played with the join command and a little with group but don't
>really understand how these work...  If anyone could point me in the right
>direction regarding how to query the database to return these records
>connected to each other, I would really appreciate it!
>
>Thanks so much
>
>Dean


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to