Use utf8mb4 instead of utf8 in MySQL database connection string

This commit is contained in:
NJ
2018-02-07 15:17:50 -08:00
parent 26cfda1b07
commit 1a62ece55b

View File

@@ -48,7 +48,7 @@ logic in and you have a "View", which is very nearly [MVC] - a common OOP archit
{% highlight php %}
<?php
$db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8', 'username', 'password');
$db = new PDO('mysql:host=localhost;dbname=testdb;charset=utf8mb4', 'username', 'password');
// Make your model available
include 'models/FooModel.php';