Skip to main content
added 13 characters in body
Source Link
Jason Heo
  • 10.3k
  • 2
  • 39
  • 72

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.

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

Use PDO, or make singleton db class youself.

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.

Source Link
Jason Heo
  • 10.3k
  • 2
  • 39
  • 72

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

Use PDO, or make singleton db class youself.