Answer the question
In order to leave comments, you need to log in
How to execute two SQL commands at the same time through PDO?
Is it possible to execute such a request through PDO (myslqi is not suitable)?
CALL `GET_AVG_SALARY`(@p0); SELECT @p0 AS `result`;
PDO->prepare()
incoming string (I don’t process the string in any way, so I would like to leave the prepare method) and just PDO->execute()
. I use it for this request. But it doesn't work for my situation. I read about transactions and it doesn’t seem to work either, because they are not used to return values. Correct if not.
Answer the question
In order to leave comments, you need to log in
can
$pdo->query("CALL `GET_AVG_SALARY`(@p0)");
$pdo->query("SELECT @p0 AS `result`");
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question