Yes, It is bad practice. Here are reasons:
- cost of making connectio is high
- cannot use transaction during many function is called
- every instance has it's own connection. It's too bad
- and so on
Use PDO, or make singleton db class youself.
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesStack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
Explore Stack InternalYes, It is bad practice. Here are reasons:
Use PDO, or make singleton db class youself.
Yes, It is bad practice. Here are reasons:
Use PDO, or make singleton db class youself.
Yes, It is bad practice. Here are reasons:
Use PDO, or make singleton db class youself.