R
R
Roquefort2018-10-17 15:58:49
MySQL
Roquefort, 2018-10-17 15:58:49

How to set a variable in Doctrine on connection?

Tell me how you can set a variable at the very beginning of the session in MySQL when using the Doctrine.
When connecting to the database, I need to do at the very beginning

[email protected]=1
To make this variable available to stored procedures on the server. During the session.
ZEND FRAMEWORK

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
novrm, 2018-10-26
@novrm

Something similar is implemented in the user registration remembering module.
The procedure occurs simultaneously both through sessions and through Doctrine.
goalio/GoalioRememberMe
goalio/GoalioRememberMeDoctrineORM

M
Mikhail Shamin, 2018-10-27
@munkie

Use postConnect event
https://www.doctrine-project.org/projects/doctrine...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question