Recent Posts

Caution: Greetings to all visitors. The site is working in short. Links Please skip the link to view any topic and thank you for visiting
header ads

DB classes with OOP (rewriting code), best solution?

Hi guys,
I'm about to rewriting code using OOP.
I started with the db connection (PDO).

I turned this:
$dsn_test = "mysql:host=localhost;dbname=xxx50;charset=utf8mb4";
$options = [
  PDO::ATTR_EMULATE_PREPARES   => false, // turn off emulation mode for "real" prepared statements
  PDO::ATTR_ERRMODE            => PDO::ERRMODE_EXCEPTION, //turn on errors in the form of exceptions
  PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, //make the default fetch be an associative array
];
try...
PHP:
DB classes with OOP (rewriting code), best solution?

from PHP https://ift.tt/3hRQDzM
via IFTTT

Post a Comment

0 Comments