RE: [PHP] mysql query with exclude

2004-11-28 Thread Reinhart Viane
Turmelle [mailto:[EMAIL PROTECTED] >>Sent: zondag 28 november 2004 2:25 >>To: [EMAIL PROTECTED] >>Cc: [EMAIL PROTECTED] >>Subject: Re: [PHP] mysql query with exclude >>Sounds like you need a join. Maybe something like: >> >>select * from chat c1, >&g

RE: [PHP] mysql query with exclude

2004-11-28 Thread Reinhart Viane
id if(c1.user2_sessionid = $thisuser)); Can I do something like this? >>-Original Message- >>From: Ligaya Turmelle [mailto:[EMAIL PROTECTED] >>Sent: zondag 28 november 2004 2:25 >>To: [EMAIL PROTECTED] >>Cc: [EMAIL PROTECTED] >>Subject: Re: [PHP] mysql q

Re: [PHP] mysql query with exclude

2004-11-27 Thread Ligaya Turmelle
Sounds like you need a join. Maybe something like: select * from chat c1, chat_online c2 where UNIX_TIMESTAMP(c2.activity)=$limit_time and c2.session_id = $thisuser and ((c1.user1_sessionid = $thisuser) or c1.user2_sessionid = $thisuser));