I\'m trying to create a simple to use singleton class to connect to mysql database and do queries, the code works fine and i haven\'t had any problems with it, but since I\'
This pattern will be fine because the singleton will only apply to the current user session. The decision really comes down to what your priority is. If you want faster performance for the user then you want to allow more database connections per user, but if you want to limit how hard your database gets hit then the singleton gives you a good middle of the road.