php7-mysql-data/Kapitel_6/Lektion_8/mediathek/_application.php

15 lines
236 B
PHP
Raw Permalink Normal View History

2016-08-25 20:50:07 +02:00
<?php
/**
* @return PDO
*/
function holeDatenbankverbindung()
{
return new PDO(
'mysql:dbname=mediathek;host=localhost',
'root',
'root',
[PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8"]
);
}