Documentaion written more detailed

This commit is contained in:
Tobias Matthaiou 2019-08-21 00:36:20 +02:00
bovenliggende a551e9b857
commit f6e077a085
4 gewijzigde bestanden met toevoegingen van 13 en 5 verwijderingen

Bestand weergeven

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

Bestand weergeven

@ -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 Normal file

Binair bestand niet weergegeven.

Na

Breedte:  |  Hoogte:  |  Grootte: 824 KiB

BIN
img/screenshot-b.png Normal file

Binair bestand niet weergegeven.

Na

Breedte:  |  Hoogte:  |  Grootte: 754 KiB