Welcome Guest, Not a member yet? Register   Sign In
Pre-query / OnConnect-query

Hi there,
I do not have idea how I could achieve some kina of ON-CONNECT QUERY connection in the best way.
Let's say when CI is connecting to database I would like to send one query (i.e. set time_zone = "+00:00") I do not have any other option to do so on specific machine.
I do not want to repeat that query many times, just once when the connection is initialized(). I was thinking about some otpions like extending some classes of CI or add a support for that in Config file and CI itself and do the PR to the CI repo .... but the question is: Is there no option actually in CI to do so? I cannot find anything in the docs.

So it looks the best is to do the query every time I know I will be asking DB using i.e. : db_connect->simpleQuery('SET time_zone="+00:00"); I cannot believe there is no better way to do this. Sad

Theme © iAndrew 2016 - Forum software by © MyBB