S
S
SoffTeam2017-03-20 06:16:09
PHP
SoffTeam, 2017-03-20 06:16:09

How to delete value in RedBean?

Working with RedBean:
Request:

$deletegame = R::getAll('SELECT * FROM casesin WHERE idcase = ? AND idgame = ?',[ $id, $_POST["idgame"] ]);
R::trashAll( $deletegame );

Throws:
Fatal error: Uncaught exception 'RedBeanPHP\RedException' with message 'OODB Store requires a bean, got: array'
And how to return an object if a query with 2 conditions is used?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
SoffTeam, 2017-03-20
@SoffTeam

Decided

$deletegame = R::exec('DELETE FROM casesin WHERE idcase = ? AND idgame = ?',[ $id, $_POST["idgood"] ]);

Y
youngmysteriouslight, 2018-01-16
@youngmysteriouslight

sed -n '/^[0-9].*\.$/ p'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question