mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-06 14:06:34 +02:00
Small fix in second example
Second example uses PDO to connect to SQLite, comment says it's connecting to MySQL
This commit is contained in:
@@ -38,7 +38,7 @@ $statement = $pdo->query("SELECT some\_field FROM some\_table");
|
||||
$row = $statement->fetch(PDO::FETCH_ASSOC);
|
||||
echo htmlentities($row['some_field']);
|
||||
|
||||
// PDO + MySQL
|
||||
// PDO + SQLite
|
||||
$pdo = new PDO('sqlite:/path/db/foo.sqlite');
|
||||
$statement = $pdo->query("SELECT some\_field FROM some\_table");
|
||||
$row = $statement->fetch(PDO::FETCH_ASSOC);
|
||||
|
Reference in New Issue
Block a user