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:
Mazen Abdulaziz
2014-05-30 17:53:04 +03:00
parent 188501a5fc
commit 5fe7d7fdff

View File

@@ -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);