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:
from PHP https://ift.tt/3hRQDzM
via IFTTT

0 Comments