RE: basic query question

2002-02-20 Thread Luc Foisy
n | 273 | | 204 | Millet| David | 302 | +-+---+-+---+ -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 2:53 PM To: Roger Karnouk; [EMAIL PROTECTED] Subject: Re: basic query question

Re: basic query question

2002-02-19 Thread Dean Householder
ED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 1:04 PM Subject: RE: basic query question You're very close: mysql> select p1.lname, p1.fname, p2.lname as engaged_lname, p2.fname as engaged_fname from members p1, members p2 where p1.id = p2.engagedto; but the REAL questio

RE: basic query question

2002-02-19 Thread Rick Emery
der [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 1:53 PM To: Roger Karnouk; [EMAIL PROTECTED] Subject: Re: basic query question Okay, so I do this and all I end up with is +-+---+-+---+ | id | lname | fname

Re: basic query question

2002-02-19 Thread Dean Householder
ECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, February 19, 2002 12:17 PM Subject: RE: basic query question you will have to join the table with itself and reference it as if it is two tables. this might be slow however so you might want to make some specific indexes to speed it up. This Que

RE: basic query question

2002-02-19 Thread Roger Karnouk
you will have to join the table with itself and reference it as if it is two tables. this might be slow however so you might want to make some specific indexes to speed it up. This Query will return all the people who are engaged and a picture of their fiancé: select p1.lname, p1.fname, p1.pic,

RE: basic query question

2002-02-19 Thread Rick Emery
: [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 i

RE: basic query question

2002-02-19 Thread Rick Emery
assuming that engaedto refers to an id, your query might be: SELECT a.lname,a.fname,b.engagedto FROM mydata a LEFT JOIN mydata b ON(a.id=b.engagedto); -Original Message- From: Dean Householder [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 11:22 AM To: [EMAIL PROTECTED] Subj

Re: basic query question

2002-02-19 Thread Oliver Heinisch
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´