8
0
Fork 0

Documentaion written more detailed

Dieser Commit ist enthalten in:
Tobias Matthaiou 2019-08-21 00:36:20 +02:00
Ursprung a551e9b857
Commit f6e077a085
4 geänderte Dateien mit 13 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -1,7 +1,7 @@
Oxid SQL Logger
---------------
Oxid eShop SQL Logger
---------------------
Returns all SQL queries in the console browser.
Returns all SQL queries into console of a browser.
## Install
@ -9,11 +9,19 @@ composer require --dev tumtum/oxid-sql-logger
## Usage
Just set the function StartSQLLog() somewhere and from that point on all SQLs will be logged.
```php
\StartSQLLog();
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$list = $db->getAll('SELECT * FROM oxarticle WHERE oxprice < ? LIMIT 100', [49.99]);
$list = $db->getAll('SELECT * FROM oxarticles WHERE oxprice < ? LIMIT 100', [49.99]);
\StopSQLLog();
```
## Screenshots
![Example all sqls](https://raw.githubusercontent.com/TumTum/oxid-sql-logger/master/img/screenshot-a.jpg)
![Example only one range](https://raw.githubusercontent.com/TumTum/oxid-sql-logger/master/img/screenshot-b.jpg)

Datei anzeigen

@ -5,6 +5,6 @@ require __DIR__ . '/../../../../source/bootstrap.php';
\StartSQLLog();
$db = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);
$list = $db->getAll('SELECT * FROM oxarticle WHERE oxprice < ? LIMIT 100', [49.99]);
$list = $db->getAll('SELECT * FROM oxarticles WHERE oxprice < ? LIMIT 100', [49.99]);
\StopSQLLog();

BIN
img/screenshot-a.jpg Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 824 KiB

BIN
img/screenshot-b.png Normale Datei

Binäre Datei nicht angezeigt.

Nachher

Breite:  |  Höhe:  |  Größe: 754 KiB