mirror of
https://github.com/codeguy/php-the-right-way.git
synced 2025-08-12 08:43:58 +02:00
added missing starting php tag
This commit is contained in:
@@ -32,6 +32,7 @@ rushed later on.
|
|||||||
many different databases. For example, you can use basically identical code to interface with MySQL or SQLite:
|
many different databases. For example, you can use basically identical code to interface with MySQL or SQLite:
|
||||||
|
|
||||||
{% highlight php %}
|
{% highlight php %}
|
||||||
|
<?php
|
||||||
// PDO + MySQL
|
// PDO + MySQL
|
||||||
$pdo = new PDO('mysql:host=example.com;dbname=database', 'user', 'password');
|
$pdo = new PDO('mysql:host=example.com;dbname=database', 'user', 'password');
|
||||||
$statement = $pdo->query("SELECT some\_field FROM some\_table");
|
$statement = $pdo->query("SELECT some\_field FROM some\_table");
|
||||||
|
Reference in New Issue
Block a user