mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-14 01:33:58 +02:00
Fixing tabbing (spacing) of PDO connection.
Just so it looks as clean as it should.
This commit is contained in:
@@ -85,14 +85,14 @@ $string = mb_substr($string, 0, 15);
|
|||||||
// See the PDO example in this document for more information
|
// See the PDO example in this document for more information
|
||||||
// Note the `set names utf8mb4` commmand!
|
// Note the `set names utf8mb4` commmand!
|
||||||
$link = new \PDO(
|
$link = new \PDO(
|
||||||
'mysql:host=your-hostname;dbname=your-db;charset=utf8mb4',
|
'mysql:host=your-hostname;dbname=your-db;charset=utf8mb4',
|
||||||
'your-username',
|
'your-username',
|
||||||
'your-password',
|
'your-password',
|
||||||
array(
|
array(
|
||||||
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
\PDO::ATTR_ERRMODE => \PDO::ERRMODE_EXCEPTION,
|
||||||
\PDO::ATTR_PERSISTENT => false
|
\PDO::ATTR_PERSISTENT => false
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Store our transformed string as UTF-8 in our database
|
// Store our transformed string as UTF-8 in our database
|
||||||
// Your DB and tables are in the utf8mb4 character set and collation, right?
|
// Your DB and tables are in the utf8mb4 character set and collation, right?
|
||||||
|
Reference in New Issue
Block a user