Forum Moderators: open
im tryin to create a message system in my webstie between users..
i got this error:
The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET SQL_MAX_JOIN_SIZE=# if the SELECT is okay
i use the following query to show their messages in inbox folder..
SELECT *
FROM TblMsgs, TblUsers
WHERE (
(
(TblMsgs.user_id_from = $loginID
AND TblMsgs.user_id_to = TblUsers.id)
OR
(TblMsgs.user_id_to = $loginID
AND TblMsgs.user_id_from = TblUsers.id)
)
ORDER BY time DESC
lets say user A is logged in....
it is 2 cases :
1- when user A send user B a message
then TblMsgs.user_id_from is ID of user A
2- when user B send user A a message
then TblMsgs.user_id_to is ID of user A
in both cases we need to have information of user B to show it beside message... so
in first case : TblMsgs.user_id_to = TblUsers.id
and in second case: TblMsgs.user_id_from = TblUsers.id
anywayz this was workin befor on some other server....
any idea how i can have same information with another query?