Answer the question
In order to leave comments, you need to log in
Why does the INSERT function in Doctrine throw a 500 Internal Server Error?
There is a function for inserting data:
$query = $app['qb']->insert('users')
->values(
array(
'user' => '?',
'value' => '?'
)
)
->setParameter(0, $name)
->setParameter(1, $value)
;
$query->execute();
POST localhost/users/add 500 (Internal Server Error)
Answer the question
In order to leave comments, you need to log in
And show the code for SELECT which works.
There is a feeling that there is a mistake in naming the qb service instead of db.
Those. should be $app['db']->insert(...);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question