Hello, there is a table of messages in which there are 2 fields sender and addressee in which the sender ID and recipient ID are stored

I make the first request:

$sender = R::findAll('messages', 'sender = ?', ['32']); 

I make a second request

 $addressee = R::findAll('messages', 'addressee = ?', ['35']); 

I receive 2 selections from a DB

Tell me how to combine these 2 requests or advise the correct implementation based on ORM RedBeanPHP

Please help in the implementation!

  • Firstly, this is old documentation, and secondly, I can read it myself, but I asked for help in the implementation of not a link to the documentation. Thank you - verstala
  • It shows how to use the substitution of several parameters. Instead of a scalar argument, an array is used. I doubt that in this moment something has changed. Try something like R::findAll('messages', 'sender = ? addressee = ?', ['32','35']); . - Akina

0