Why use a persistent connection? I never use those. Just open up a connection for a transaction and close it. Let mysql handle the concurrency.
Anyone know how you should handle getting LAST_INSERT_ID with a persistent connection? From what I understand, it can be extremely dangerous. Anyone got a bodge fix, without opening another connection?
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020
Why use a persistent connection? I never use those. Just open up a connection for a transaction and close it. Let mysql handle the concurrency.
THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE
"First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311
HAVING VIRTUAL DETOX
MikeRohsoft (11-05-2018)
Click Here to visit the official MPGH wiki! Keep up with the latest news and information on games and MPGH! To check out pages dedicated to games, see the links below!
dd/mm/yyyy
Member - 31/01/2015
Premium - 12/09/2016
Call of Duty minion - 05/11/2016 - 05/11/2019
BattleOn minion - 28/02/2017 - 05/11/2019
Battlefield minion - 30/05/2017 - 05/11/2019
Other Semi-Popular First Person Shooter Hacks minion - 21/09/2017 - 17/09/2019
Publicist - 07/11/2017 - 02/08/2018
Cock Sucker - 01/12/2017 - Unknown
Minion+ - 06/03/2018 - 05/11/2019
Fortnite minion - 08/05/2018 - 05/11/2019
Head Publicist - 08/10/2018 - 10/01/2020
Developer Team - 26/10/2019 - 10/01/2020
Former Staff - 10/01/2020
Does MySQL not have connection pooling? closing/reopening is probably more efficient than keeping one open for extended periods of time.
Ah we-a blaze the fyah, make it bun dem!
I don't recommend using pconnection, under all circumstances though, you just have to make a failsafe for the possible case of an erronous return, meaning you should always have the call return a row, no matter what.
I mean the whole idea of "One connection vs. Unlimited" seems to be the only ever, EVER, argument, and it is so stupid that you should not use it.
Sure, you can have one OBJECT to handle all the tasks of any other object you would use, I mean why can't an object contain the neccessary information to substitute for all other objects? Right? Well, sure, that's a good way to put it, but no it's stupid and you know it, so why must you persistently push for something similarly stupid when you as a developer understand the underlying problem of an insecurity...
I hope I don't offend anyone, and I'm not particularly fond of persistent connections, never felt the need to use it... There is a way to make it safe, but it would defeat the overall purpose. That is to have a non-persistent connection to a persistent connection that is encapsulated and only accessible when needed, well it's a stupid idea anyway, but good luck on your issues.
[MPGH]Dave84311 (11-09-2018)