remove mkdocs specific syntax

This commit is contained in:
Marcello 2024-06-16 19:14:59 +02:00
parent 8d08c1964f
commit 8026e1465b
Signed by: m-lamonaca
SSH key fingerprint: SHA256:8db8uii6Gweq7TbKixFBioW2T8CbgtyFETyYL3cr3zk
77 changed files with 1128 additions and 1128 deletions

View file

@ -8,7 +8,7 @@ PDO is the PHP extension for database access through a single API. It supports v
### Database Connection
```php linenums="1"
```php
$dsn = "mysql:dbname=<dbname>;host=<ip>";
$user="<db_user>";
$password="<db_password>";
@ -25,7 +25,7 @@ try {
To execute a query it's necessary to "prepare it" with *parameters*.
```php linenums="1"
```php
# literal string with markers
$sql = 'SELECT fields
FROM tables
@ -44,7 +44,7 @@ $result = $stmt->fetchAll(PDO::FETCH_CLASS, ClassName::class); # result as obje
### Parameter Binding
```php linenums="1"
```php
# bindValue
$stmt = pdo->prepare(sql);
$stmt->bindValue(':marker', value, PDO::PARAM_<type>);
@ -64,7 +64,7 @@ Its possible to disable this behaviour setting `PDO::ATTR_STRINGIFY_FETCHES` and
> **Note**: `FETCH_OBJ` abd `FETCH_CLASS` return classes and don't have this behaviour.
```php linenums="1"
```php
pdo->setAttribute()
$pdo->setAttribute(PDO::ATTR_STRINGIFY_FETCHES, false);
@ -77,7 +77,7 @@ $result = $stmt->fetchAll(PDO::FETCH_ASSOC);
### PDO Debug
```php linenums="1"
```php
$stmt = $pdo->prepare($sql);
$stmt->execute([':marker' => value]);
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
@ -87,7 +87,7 @@ $stmt->debugDumpParams(); # print the SQL query that has been sent to the datab
## [SQLite3](https://www.php.net/manual/en/book.sqlite3.php)
```php linenums="1"
```php
$db = SQLite3("db_file.sqlite3"); // connection
$stmt = $db->prepare("SELECT fields FROM tables WHERE field <operator> :marker"); // prepare query