Open momoelz opened 6 years ago
wouldn't it be easier to do
->where ('receiver', array($receiver, $sender), 'IN')
->orWhere('sender', array($receiver, $sender, 'IN')
->where ('receiver', array($receiver, $sender), 'IN') ->orWhere('sender', array($receiver, $sender), 'IN')
thx the working querry is
->where ('receiver', array($receiver, $sender), 'IN') ->Where('sender', array($receiver, $sender, 'IN')
Any idea on how to create queries with conditions in Round Brackets? where you could do something like this::
... WHERE ... AND (column1 = X OR (column2 = 0 AND column3 > X))
I have a little problem, maybe I dont know how it use coded correctly.
The Case is following, i have a Table for messages with sender & reciever which can vary depending on who sends to whom the message lets say there is a conversation between A & B
so sender can be A & B and reciever can be A & B
right now i use this code but it only shows me messages from A