jingzhi Posted November 15, 2015 Share Posted November 15, 2015 Hello everyone, What should I do if I want to share the dbConnection between all my resources? Link to comment
Noki Posted November 15, 2015 Share Posted November 15, 2015 Keep the connection in one resource. Call it 'mysql'. Create an export within 'mysql' that returns the database connection you established using dbConnect. Just use that export in every resource you require MySQL usage in. Remember, it will only be server-sided. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now