php7-mysql-data/Kapitel_10/Lektion_4/konventionell/_application.php

15 lines
236 B
PHP
Raw Permalink Normal View History

2016-08-16 21:20:53 +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"]
);
}