hello,

i spent about 2 hours solve this problem, i have got a 2 mysql tables,
eg:

data

room_id
user_id
user_typ
user_login

messages

id
text
from
from_type (quest, user)
to
to_type (quest, user)
itime (type datetime, time when message were insert)

and my situation:

data

1   1  u    joe
1   2  h    thomas
1   3  u    peter

messages

1     bla1   1   u   2   h   2003-10-02 15:00:00
2     bla2   2   h   1   u   2003-10-02 15:00:20
3     bla3   3   u   1   u   2003-10-02 15:00:40
4     bla4   2   h   1   u   2003-10-02 15:01:05

I need in one SQL select, if is possible, get all records (user_id,
user_typ, user_login) from table data of users who sent me later a
private message (private message = from, from_type, to, to_type is
set) then I sent message to him.

thanks for all ideas.

j. nemec.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to