Try this:

SELECT * FROM content, address WHERE content.msg_id = address.msg_id

If I understand what your asking for, you want a JOIN. If I don't
understand, forgive me, it's late... :)

Tyrone

-----Original Message-----
From: matteo [mailto:matt@web]On Behalf Of Matthieu Paindavoine
Sent: Thursday, June 14, 2001 10:00 PM
To: [EMAIL PROTECTED]
Subject: Collapsing queries


Hello,

I am relatively new with MySQL (and SQL for that matter) and I couldn't
find much reference to my problem in earlier posts.

Let's say I have 2 tables,

CONTENT: msg_id, msg_text

ADDRESS: msg_id, address

and I receive the msg "Hello World" addressed to the twins Foo and Bar.
now my tables look like this:

CONTENT:

1       Hello World

ADDRESS:

1       Foo
1       Bar

I am desperatly looking for a sql statement that would produce

1       |       Hello World     |       Foo, Bar

Is there such a thing??

I welcome any suggestions,

Thanks

Matthieu

---------------------------------------------------------------------
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