Can you show me your complete SQL sentence?

I thing you have to use two Users tables.

Andres.

----- Original Message -----
From: Jonas Jonsson <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 07, 2001 12:02 PM
Subject: Problem with a Select


Hi

I have a table named Messages
It looks like this

  Message   From   To

  Exampel      1       2


And I also have a table named Users, A short version of it looks like this

UserID UserName
   1         Me
   2         You

Now to the problem

I want to do a Select from Messages like this

SELECT * FROM Messages;

And the fields From and To shall be replaced with the name from the User
table

For exampel

When I have done the select it should return

Message   From   To
Exampel    Me     You

I have tryed to think this out but all I have come up with is that I only
receive one of the names and not the other

I hop some of you out there know better then me :)

/Jonas


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