mirror of
https://github.com/dg/dibi.git
synced 2025-08-01 11:50:15 +02:00
examples: tracy is loaded before output [Closes #248]
This commit is contained in:
@@ -1,7 +1,3 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
|
||||||
|
|
||||||
<h1>Fetching Examples | dibi</h1>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||||
@@ -10,6 +6,12 @@ if (@!include __DIR__ . '/../vendor/autoload.php') {
|
|||||||
|
|
||||||
Tracy\Debugger::enable();
|
Tracy\Debugger::enable();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<h1>Fetching Examples | dibi</h1>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
dibi::connect([
|
dibi::connect([
|
||||||
'driver' => 'sqlite3',
|
'driver' => 'sqlite3',
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
|
||||||
|
|
||||||
<h1>Result Set Data Types | dibi</h1>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Dibi\Type;
|
use Dibi\Type;
|
||||||
@@ -14,6 +10,12 @@ Tracy\Debugger::enable();
|
|||||||
|
|
||||||
date_default_timezone_set('Europe/Prague');
|
date_default_timezone_set('Europe/Prague');
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<h1>Result Set Data Types | dibi</h1>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
dibi::connect([
|
dibi::connect([
|
||||||
'driver' => 'sqlite3',
|
'driver' => 'sqlite3',
|
||||||
|
@@ -1,9 +1,3 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
|
||||||
|
|
||||||
<h1>Tracy & SQL Exceptions | dibi</h1>
|
|
||||||
|
|
||||||
<p>Dibi can display and log exceptions via <a href="https://tracy.nette.org">Tracy</a>.</p>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||||
@@ -31,3 +25,9 @@ $panel->register($connection);
|
|||||||
|
|
||||||
// throws error because SQL is bad
|
// throws error because SQL is bad
|
||||||
dibi::query('SELECT FROM customers WHERE customer_id < ?', 38);
|
dibi::query('SELECT FROM customers WHERE customer_id < ?', 38);
|
||||||
|
|
||||||
|
?><!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<h1>Tracy & SQL Exceptions | dibi</h1>
|
||||||
|
|
||||||
|
<p>Dibi can display and log exceptions via <a href="https://tracy.nette.org">Tracy</a>.</p>
|
||||||
|
@@ -1,11 +1,3 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
|
||||||
|
|
||||||
<style> html { background: url(data/arrow.png) no-repeat bottom right; height: 100%; } </style>
|
|
||||||
|
|
||||||
<h1>Tracy | dibi</h1>
|
|
||||||
|
|
||||||
<p>Dibi can log queries and dump variables to the <a href="https://tracy.nette.org">Tracy</a>.</p>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||||
@@ -36,3 +28,13 @@ dibi::query('SELECT 123');
|
|||||||
|
|
||||||
// result set will be dumped
|
// result set will be dumped
|
||||||
Tracy\Debugger::barDump(dibi::fetchAll('SELECT * FROM customers WHERE customer_id < ?', 38), '[customers]');
|
Tracy\Debugger::barDump(dibi::fetchAll('SELECT * FROM customers WHERE customer_id < ?', 38), '[customers]');
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<style> html { background: url(data/arrow.png) no-repeat bottom right; height: 100%; } </style>
|
||||||
|
|
||||||
|
<h1>Tracy | dibi</h1>
|
||||||
|
|
||||||
|
<p>Dibi can log queries and dump variables to the <a href="https://tracy.nette.org">Tracy</a>.</p>
|
||||||
|
@@ -1,7 +1,3 @@
|
|||||||
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
|
||||||
|
|
||||||
<h1>Using Extension Methods | dibi</h1>
|
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
if (@!include __DIR__ . '/../vendor/autoload.php') {
|
||||||
@@ -10,6 +6,12 @@ if (@!include __DIR__ . '/../vendor/autoload.php') {
|
|||||||
|
|
||||||
Tracy\Debugger::enable();
|
Tracy\Debugger::enable();
|
||||||
|
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html><link rel="stylesheet" href="data/style.css">
|
||||||
|
|
||||||
|
<h1>Using Extension Methods | dibi</h1>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
|
||||||
dibi::connect([
|
dibi::connect([
|
||||||
'driver' => 'sqlite3',
|
'driver' => 'sqlite3',
|
||||||
|
Reference in New Issue
Block a user