S
S
sanya1642017-05-25 16:44:38
PHP
sanya164, 2017-05-25 16:44:38

How to display all rows from RedBeanPHP table?

Hello, I'm using RedBeanPHP , and I have a table , it has 3 rows that look like this
236cf0510bf249018469713805df461a.PNG
and I want to display from this table all rows that have "name" equal to "author"

$name = 'author';
$game = R::findOne('game', 'name = ?', array($name));
  echo $game;

But with this code, only the first line that comes across is displayed. How can I make it output all lines with that name? so it doesn't show anything at all Thanks in advance)
$game = R::find('game', 'name = ?', array($name));

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg Agapov, 2017-05-25
@sanya164

Maybe "_findAll"?
redbeanphp.com/api/class-RedBeanPHP.Facade.html#_f...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question