diff --git a/dibi/bridges/Nette/DibiNettePanel.php b/dibi/bridges/Nette/DibiNettePanel.php index c26d36d0..49eee3b1 100644 --- a/dibi/bridges/Nette/DibiNettePanel.php +++ b/dibi/bridges/Nette/DibiNettePanel.php @@ -102,7 +102,7 @@ class DibiNettePanel extends DibiObject implements IBarPanel } return '' . count($this->events) . ' queries' - . ($totalTime ? ' / ' . sprintf('%0.1f', $totalTime * 1000) . 'ms' : '') + . ($totalTime ? sprintf(' / %0.1f ms', $totalTime * 1000) : '') . ''; } @@ -154,7 +154,7 @@ class DibiNettePanel extends DibiObject implements IBarPanel ' -

Queries: ' . count($this->events) . ($totalTime === NULL ? '' : ', time: ' . sprintf('%0.3f', $totalTime * 1000) . ' ms') . '

+

Queries: ' . count($this->events) . ($totalTime === NULL ? '' : sprintf(', time: %0.3f ms', $totalTime * 1000)) . '

' . $s . ' diff --git a/dibi/libs/DibiFileLogger.php b/dibi/libs/DibiFileLogger.php index 79c55d49..fd26a8d2 100644 --- a/dibi/libs/DibiFileLogger.php +++ b/dibi/libs/DibiFileLogger.php @@ -60,7 +60,7 @@ class DibiFileLogger extends DibiObject fwrite($handle, "OK: " . $event->sql . ($event->count ? ";\n-- rows: " . $event->count : '') - . "\n-- takes: " . sprintf('%0.3f', $event->time * 1000) . ' ms' + . "\n-- takes: " . sprintf('%0.3f ms', $event->time * 1000) . "\n-- source: " . implode(':', $event->source) . "\n-- driver: " . $event->connection->getConfig('driver') . '/' . $event->connection->getConfig('name') . "\n-- " . date('Y-m-d H:i:s') diff --git a/dibi/libs/DibiLiteral.php b/dibi/libs/DibiLiteral.php index 5bf15d4f..c5dfd7f4 100644 --- a/dibi/libs/DibiLiteral.php +++ b/dibi/libs/DibiLiteral.php @@ -10,6 +10,7 @@ * SQL literal value. * * @author David Grudl + * @package dibi */ class DibiLiteral extends DibiObject { diff --git a/examples/connecting-to-databases.php b/examples/connecting-to-databases.php index 2a5aeb5b..82fb232e 100644 --- a/examples/connecting-to-databases.php +++ b/examples/connecting-to-databases.php @@ -12,8 +12,8 @@ require dirname(__FILE__) . '/../dibi/dibi.php'; echo '

Connecting to Sqlite: '; try { dibi::connect(array( - 'driver' => 'sqlite', - 'database' => 'data/sample.sdb', + 'driver' => 'sqlite3', + 'database' => 'data/sample.s3db', )); echo 'OK'; @@ -27,8 +27,8 @@ echo "

\n"; echo '

Connecting to Sqlite: '; try { $connection = new DibiConnection(array( - 'driver' => 'sqlite', - 'database' => 'data/sample.sdb', + 'driver' => 'sqlite3', + 'database' => 'data/sample.s3db', )); echo 'OK'; diff --git a/readme.md b/readme.md index 00d703b3..9945bc64 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,9 @@ [Dibi](http://dibiphp.com) - smart database layer for PHP ========================================================= +[![Downloads this Month](https://img.shields.io/packagist/dm/dibi/dibi.svg)](https://packagist.org/packages/dibi/dibi) +[![Build Status](https://travis-ci.org/dg/dibi.svg?branch=master)](https://travis-ci.org/dg/dibi) + Database access functions in PHP are not standardised. This library hides the differences between them, and above all, it gives you a very handy interface. @@ -125,8 +128,3 @@ echo dibi::$elapsedTime; echo dibi::$numOfQueries; echo dibi::$totalTime; ``` - - ------ - -[![Build Status](https://secure.travis-ci.org/dg/dibi.png?branch=master)](http://travis-ci.org/dg/dibi)

Time msSQL StatementRowsConnection