PDO::ERRMODE_EXCEPTION, PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, PDO::ATTR_EMULATE_PREPARES => false, // rowCount() on an UPDATE reports rows *matched*, not rows // changed. journal-save.php leans on that to tell "not yours / // no such row" apart from "saved, but nothing actually // differed" - without it, re-saving an entry you didn't edit // comes back as "Entry not found." PDO::MYSQL_ATTR_FOUND_ROWS => true, ] ); return $pdo; }